1. 30 4月, 2012 3 次提交
  2. 29 3月, 2012 1 次提交
  3. 07 3月, 2012 1 次提交
    • S
      x86, mce: Fix rcu splat in drain_mce_log_buffer() · b11e3d78
      Srivatsa S. Bhat 提交于
      While booting, the following message is seen:
      
      [   21.665087] ===============================
      [   21.669439] [ INFO: suspicious RCU usage. ]
      [   21.673798] 3.2.0-0.0.0.28.36b5ec9-default #2 Not tainted
      [   21.681353] -------------------------------
      [   21.685864] arch/x86/kernel/cpu/mcheck/mce.c:194 suspicious rcu_dereference_index_check() usage!
      [   21.695013]
      [   21.695014] other info that might help us debug this:
      [   21.695016]
      [   21.703488]
      [   21.703489] rcu_scheduler_active = 1, debug_locks = 1
      [   21.710426] 3 locks held by modprobe/2139:
      [   21.714754]  #0:  (&__lockdep_no_validate__){......}, at: [<ffffffff8133afd3>] __driver_attach+0x53/0xa0
      [   21.725020]  #1:
      [   21.725323] ioatdma: Intel(R) QuickData Technology Driver 4.00
      [   21.733206]  (&__lockdep_no_validate__){......}, at: [<ffffffff8133afe1>] __driver_attach+0x61/0xa0
      [   21.743015]  #2:  (i7core_edac_lock){+.+.+.}, at: [<ffffffffa01cfa5f>] i7core_probe+0x1f/0x5c0 [i7core_edac]
      [   21.753708]
      [   21.753709] stack backtrace:
      [   21.758429] Pid: 2139, comm: modprobe Not tainted 3.2.0-0.0.0.28.36b5ec9-default #2
      [   21.768253] Call Trace:
      [   21.770838]  [<ffffffff810977cd>] lockdep_rcu_suspicious+0xcd/0x100
      [   21.777366]  [<ffffffff8101aa41>] drain_mcelog_buffer+0x191/0x1b0
      [   21.783715]  [<ffffffff8101aa78>] mce_register_decode_chain+0x18/0x20
      [   21.790430]  [<ffffffffa01cf8db>] i7core_register_mci+0x2fb/0x3e4 [i7core_edac]
      [   21.798003]  [<ffffffffa01cfb14>] i7core_probe+0xd4/0x5c0 [i7core_edac]
      [   21.804809]  [<ffffffff8129566b>] local_pci_probe+0x5b/0xe0
      [   21.810631]  [<ffffffff812957c9>] __pci_device_probe+0xd9/0xe0
      [   21.816650]  [<ffffffff813362e4>] ? get_device+0x14/0x20
      [   21.822178]  [<ffffffff81296916>] pci_device_probe+0x36/0x60
      [   21.828061]  [<ffffffff8133ac8a>] really_probe+0x7a/0x2b0
      [   21.833676]  [<ffffffff8133af23>] driver_probe_device+0x63/0xc0
      [   21.839868]  [<ffffffff8133b01b>] __driver_attach+0x9b/0xa0
      [   21.845718]  [<ffffffff8133af80>] ? driver_probe_device+0xc0/0xc0
      [   21.852027]  [<ffffffff81339168>] bus_for_each_dev+0x68/0x90
      [   21.857876]  [<ffffffff8133aa3c>] driver_attach+0x1c/0x20
      [   21.863462]  [<ffffffff8133a64d>] bus_add_driver+0x16d/0x2b0
      [   21.869377]  [<ffffffff8133b6dc>] driver_register+0x7c/0x160
      [   21.875220]  [<ffffffff81296bda>] __pci_register_driver+0x6a/0xf0
      [   21.881494]  [<ffffffffa01fe000>] ? 0xffffffffa01fdfff
      [   21.886846]  [<ffffffffa01fe047>] i7core_init+0x47/0x1000 [i7core_edac]
      [   21.893737]  [<ffffffff810001ce>] do_one_initcall+0x3e/0x180
      [   21.899670]  [<ffffffff810a9b95>] sys_init_module+0xc5/0x220
      [   21.905542]  [<ffffffff8149bc39>] system_call_fastpath+0x16/0x1b
      
      Fix this by using ACCESS_ONCE() instead of rcu_dereference_check_mce()
      over mcelog.next. Since the access to each entry is controlled by the
      ->finished field, ACCESS_ONCE() should work just fine. An rcu_dereference
      is unnecessary here.
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Suggested-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      b11e3d78
  4. 23 2月, 2012 2 次提交
  5. 22 2月, 2012 1 次提交
  6. 27 1月, 2012 1 次提交
  7. 17 1月, 2012 1 次提交
  8. 14 1月, 2012 1 次提交
  9. 04 1月, 2012 5 次提交
    • T
      x86/mce: Recognise machine check bank signature for data path error · 5f7b88d5
      Tony Luck 提交于
      Action required data path signature is defined in table 15-19 of SDM:
      
      +-----------------------------------------------------------------------------+
      | SRAR Error | Valid | OVER | UC | EN | MISCV | ADDRV | PCC | S | AR | MCACOD |
      | Data Load  |     1 |    0 |  1 |  1 |     1 |     1 |   0 | 1 |  1 |  0x134 |
      +-----------------------------------------------------------------------------+
      
      Recognise this, and pass MCE_AR_SEVERITY code back to do_machine_check() if
      we have the action handler configured (CONFIG_MEMORY_FAILURE=y)
      Acked-by: NBorislav Petkov <bp@amd64.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      5f7b88d5
    • T
      x86/mce: Handle "action required" errors · a8c321fb
      Tony Luck 提交于
      All non-urgent actions (reporting low severity errors and handling
      "action-optional" errors) are now handled by a work queue. This
      means that TIF_MCE_NOTIFY can be used to block execution for a
      thread experiencing an "action-required" fault until we get all
      cpus out of the machine check handler (and the thread that hit
      the fault into mce_notify_process().
      
      We use the new mce_{save,find,clear}_info() API to get information
      from do_machine_check() to mce_notify_process(), and then use the
      newly improved memory_failure(..., MF_ACTION_REQUIRED) to handle
      the error (possibly signalling the process).
      
      Update some comments to make the new code flows clearer.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      a8c321fb
    • T
      x86/mce: Add mechanism to safely save information in MCE handler · af104e39
      Tony Luck 提交于
      Machine checks on Intel cpus interrupt execution on all cpus, regardless
      of interrupt masking.  We have a need to save some data about the cause
      of the machine check (physical address) in the machine check handler that
      can be retrieved later to attempt recovery in a more flexible execution
      state.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      af104e39
    • T
      x86/mce: Create helper function to save addr/misc when needed · 85f92694
      Tony Luck 提交于
      The MCI_STATUS_MISCV and MCI_STATUS_ADDRV bits in the bank status
      registers define whether the MISC and ADDR registers respectively
      contain valid data - provide a helper function to check these bits
      and read the registers when needed.
      
      In addition, processors that support software error recovery (as
      indicated by the MCG_SER_P bit in the MCG_CAP register) may include
      some undefined bits in the ADDR register - mask these out.
      Acked-by: NBorislav Petkov <bp@amd64.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      85f92694
    • T
      HWPOISON: Clean up memory_failure() vs. __memory_failure() · cd42f4a3
      Tony Luck 提交于
      There is only one caller of memory_failure(), all other users call
      __memory_failure() and pass in the flags argument explicitly. The
      lone user of memory_failure() will soon need to pass flags too.
      
      Add flags argument to the callsite in mce.c. Delete the old memory_failure()
      function, and then rename __memory_failure() without the leading "__".
      
      Provide clearer message when action optional memory errors are ignored.
      Acked-by: NBorislav Petkov <bp@amd64.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      cd42f4a3
  10. 22 12月, 2011 1 次提交
    • K
      cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem · 8a25a2fd
      Kay Sievers 提交于
      This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
      and converts the devices to regular devices. The sysdev drivers are
      implemented as subsystem interfaces now.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Userspace relies on events and generic sysfs subsystem infrastructure
      from sysdev devices, which are made available with this conversion.
      
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8a25a2fd
  11. 21 12月, 2011 1 次提交
  12. 17 12月, 2011 1 次提交
  13. 15 12月, 2011 1 次提交
    • F
      x86, mce, therm_throt: Don't report power limit and package level thermal throttle events in mcelog · 29e9bf18
      Fenghua Yu 提交于
      Thermal throttle and power limit events are not defined as MCE errors in x86
      architecture and should not generate MCE errors in mcelog.
      
      Current kernel generates fake software defined MCE errors for these events.
      This may confuse users because they may think the machine has real MCE errors
      while actually only thermal throttle or power limit events happen.
      
      To make it worse, buggy firmware on some platforms may falsely generate
      the events. Therefore, kernel reports MCE errors which users think as real
      hardware errors. Although the firmware bugs should be fixed, on the other hand,
      kernel should not report MCE errors either.
      
      So mcelog is not a good mechanism to report these events. To report the events, we count them in respective counters (core_power_limit_count,
      package_power_limit_count, core_throttle_count, and package_throttle_count) in
      /sys/devices/system/cpu/cpu#/thermal_throttle/. Users can check the counters
      for each event on each CPU. Please note that all CPU's on one package report
      duplicate counters. It's user application's responsibity to retrieve a package
      level counter for one package.
      
      This patch doesn't report package level power limit, core level power limit, and
      package level thermal throttle events in mcelog. When the events happen, only
      report them in respective counters in sysfs.
      
      Since core level thermal throttle has been legacy code in kernel for a while and
      users accepted it as MCE error in mcelog, core level thermal throttle is still
      reported in mcelog. In the mean time, the event is counted in a counter in sysfs
      as well.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Acked-by: NBorislav Petkov <bp@amd64.org>
      Acked-by: NTony Luck <tony.luck@intel.com>
      Link: http://lkml.kernel.org/r/20111215001945.GA21009@linux-os.sc.intel.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      29e9bf18
  14. 14 12月, 2011 2 次提交
  15. 12 12月, 2011 1 次提交
    • F
      x86: Call idle notifier after irq_enter() · 98ad1cc1
      Frederic Weisbecker 提交于
      Interrupts notify the idle exit state before calling irq_enter().
      But the notifier code calls rcu_read_lock() and this is not
      allowed while rcu is in an extended quiescent state. We need
      to wait for irq_enter() -> rcu_idle_exit() to be called before
      doing so otherwise this results in a grumpy RCU:
      
      [    0.099991] WARNING: at include/linux/rcupdate.h:194 __atomic_notifier_call_chain+0xd2/0x110()
      [    0.099991] Hardware name: AMD690VM-FMH
      [    0.099991] Modules linked in:
      [    0.099991] Pid: 0, comm: swapper Not tainted 3.0.0-rc6+ #255
      [    0.099991] Call Trace:
      [    0.099991]  <IRQ>  [<ffffffff81051c8a>] warn_slowpath_common+0x7a/0xb0
      [    0.099991]  [<ffffffff81051cd5>] warn_slowpath_null+0x15/0x20
      [    0.099991]  [<ffffffff817d6fa2>] __atomic_notifier_call_chain+0xd2/0x110
      [    0.099991]  [<ffffffff817d6ff1>] atomic_notifier_call_chain+0x11/0x20
      [    0.099991]  [<ffffffff81001873>] exit_idle+0x43/0x50
      [    0.099991]  [<ffffffff81020439>] smp_apic_timer_interrupt+0x39/0xa0
      [    0.099991]  [<ffffffff817da253>] apic_timer_interrupt+0x13/0x20
      [    0.099991]  <EOI>  [<ffffffff8100ae67>] ? default_idle+0xa7/0x350
      [    0.099991]  [<ffffffff8100ae65>] ? default_idle+0xa5/0x350
      [    0.099991]  [<ffffffff8100b19b>] amd_e400_idle+0x8b/0x110
      [    0.099991]  [<ffffffff810cb01f>] ? rcu_enter_nohz+0x8f/0x160
      [    0.099991]  [<ffffffff810019a0>] cpu_idle+0xb0/0x110
      [    0.099991]  [<ffffffff817a7505>] rest_init+0xe5/0x140
      [    0.099991]  [<ffffffff817a7468>] ? rest_init+0x48/0x140
      [    0.099991]  [<ffffffff81cc5ca3>] start_kernel+0x3d1/0x3dc
      [    0.099991]  [<ffffffff81cc5321>] x86_64_start_reservations+0x131/0x135
      [    0.099991]  [<ffffffff81cc5412>] x86_64_start_kernel+0xed/0xf4
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Andy Henroid <andrew.d.henroid@intel.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      98ad1cc1
  16. 08 11月, 2011 1 次提交
  17. 01 11月, 2011 3 次提交
  18. 19 10月, 2011 1 次提交
  19. 14 10月, 2011 1 次提交
  20. 10 10月, 2011 1 次提交
  21. 14 9月, 2011 1 次提交
    • H
      x86, mce: Do not call del_timer_sync() in IRQ context · 9aaef96f
      Hidetoshi Seto 提交于
      del_timer_sync() can cause a deadlock when called in interrupt context.
      It is used with on_each_cpu() in some parts for sysfs files like bank*,
      check_interval, cmci_disabled and ignore_ce.
      
      However, use of on_each_cpu() results in calling the function passed
      as the argument in interrupt context. This causes a flood of nested
      warnings from del_timer_sync() (it runs on each CPU) caused even by a
      simple file access like:
      
      $ echo 300 > /sys/devices/system/machinecheck/machinecheck0/check_interval
      
      Fortunately, these MCE-specific files are rarely used and AFAIK only few
      MCE geeks experience this warning.
      
      To remove the warning, move timer deletion outside of the interrupt
      context.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      9aaef96f
  22. 13 9月, 2011 1 次提交
  23. 16 6月, 2011 8 次提交