diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-09 13:31:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-09 13:31:07 -0800 |
commit | af1713e0f111647052953ba12fd10a59c74a5dde (patch) | |
tree | 4a0cc831c88f888e33a6d9c5ff89f80a8aee42a0 /arch/x86_64/kernel/nmi.c | |
parent | 9b3a89f8b052f2a6193a9691e053f986144a65a0 (diff) | |
parent | f0f32fccbffaaba8596d5c671153aa37aea9d4f0 (diff) |
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
[PATCH] x86-64: no paravirt for X86_VOYAGER or X86_VISWS
[PATCH] i386: Fix io_apic.c warning
[PATCH] i386: export smp_num_siblings for oprofile
[PATCH] x86: Work around gcc 4.2 over aggressive optimizer
[PATCH] x86: Fix boot hang due to nmi watchdog init code
[PATCH] x86: Fix verify_quirk_intel_irqbalance()
[PATCH] i386: Update defconfig
[PATCH] x86-64: Update defconfig
Diffstat (limited to 'arch/x86_64/kernel/nmi.c')
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 27e95e7922c1..186aebbae32d 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c @@ -193,6 +193,8 @@ void nmi_watchdog_default(void) nmi_watchdog = NMI_IO_APIC; } +static int endflag __initdata = 0; + #ifdef CONFIG_SMP /* The performance counters used by NMI_LOCAL_APIC don't trigger when * the CPU is idle. To make sure the NMI watchdog really ticks on all @@ -200,7 +202,6 @@ void nmi_watchdog_default(void) */ static __init void nmi_cpu_busy(void *data) { - volatile int *endflag = data; local_irq_enable_in_hardirq(); /* Intentionally don't use cpu_relax here. This is to make sure that the performance counter really ticks, @@ -208,14 +209,13 @@ static __init void nmi_cpu_busy(void *data) pause instruction. On a real HT machine this is fine because all other CPUs are busy with "useless" delay loops and don't care if they get somewhat less cycles. */ - while (*endflag == 0) - barrier(); + while (endflag == 0) + mb(); } #endif int __init check_nmi_watchdog (void) { - volatile int endflag = 0; int *counts; int cpu; @@ -256,6 +256,7 @@ int __init check_nmi_watchdog (void) if (!atomic_read(&nmi_active)) { kfree(counts); atomic_set(&nmi_active, -1); + endflag = 1; return -1; } endflag = 1; |