linux-kernel-test/arch/x86
Dongdong Deng 554ec06398 x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time
The spin_lock_debug/rcu_cpu_stall detector uses
trigger_all_cpu_backtrace() to dump cpu backtrace.
Therefore it is possible that trigger_all_cpu_backtrace()
could be called at the same time on different CPUs, which
triggers and 'unknown reason NMI' warning. The following case
illustrates the problem:

      CPU1                    CPU2                     ...   CPU N
                       trigger_all_cpu_backtrace()
                       set "backtrace_mask" to cpu mask
                               |
generate NMI interrupts  generate NMI interrupts       ...
    \                          |                               /
     \                         |                              /

The "backtrace_mask" will be cleaned by the first NMI interrupt
at nmi_watchdog_tick(), then the following NMI interrupts
generated by other cpus's arch_trigger_all_cpu_backtrace() will
be taken as unknown reason NMI interrupts.

This patch uses a test_and_set to avoid the problem, and stop
the arch_trigger_all_cpu_backtrace() from calling to avoid
dumping a double cpu backtrace info when there is already a
trigger_all_cpu_backtrace() in progress.

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Reviewed-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: fweisbec@gmail.com
LKML-Reference: <1294198689-15447-2-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Don Zickus <dzickus@redhat.com>
2011-01-05 14:22:57 +01:00
..
boot x86-32: Make sure we can map all of lowmem if we need to 2010-12-16 19:11:09 -08:00
configs defconfig reduction 2010-08-14 22:26:53 +02:00
crypto crypto: ghash-intel - ghash-clmulni-intel_glue needs err.h 2010-12-15 19:44:08 +08:00
ia32 BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
include/asm Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/core 2010-12-30 11:26:45 +01:00
kernel x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time 2011-01-05 14:22:57 +01:00
kvm KVM: i8259: initialize isr_ack 2011-01-02 11:52:48 +02:00
lguest lguest: populate initial_page_table 2010-12-16 17:03:15 +10:30
lib x86, mem: Optimize memmove for small size and unaligned cases 2010-09-24 18:57:11 -07:00
math-emu
mm Merge commit 'v2.6.37-rc5' into perf/core 2010-12-07 07:49:51 +01:00
oprofile Merge commit 'v2.6.37' into perf/core 2011-01-05 14:22:10 +01:00
pci x86: avoid low BIOS area when allocating address space 2010-12-17 10:01:17 -08:00
platform x86: UV: Address interrupt/IO port operation conflict 2010-11-18 10:41:25 +01:00
power x86, tsc, sched: Recompute cyc2ns_offset's during resume from sleep states 2010-08-20 14:59:02 +02:00
tools
vdso x86, gcc-4.6: Use gcc -m options when building vdso 2010-12-13 16:08:37 -08:00
video
xen Merge branches 'x86-fixes-for-linus', 'perf-fixes-for-linus' and 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-12-08 06:40:59 -08:00
.gitignore
Kbuild x86: Add platform directory 2010-10-27 14:30:01 +02:00
Kconfig perf, x86: Fixup Kconfig deps 2010-11-26 15:00:58 +01:00
Kconfig.cpu Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:58:16 -07:00
Kconfig.debug Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-22 08:54:21 -07:00
Makefile Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-10-21 13:06:00 -07:00
Makefile_32.cpu jump label: Add work around to i386 gcc asm goto bug 2010-10-29 14:45:29 -04:00