diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/nmi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index f5bc7e1be801..a5e34d655965 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -195,6 +195,8 @@ static __cpuinit inline int nmi_known_cpu(void) | |||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | static int endflag __initdata = 0; | ||
199 | |||
198 | #ifdef CONFIG_SMP | 200 | #ifdef CONFIG_SMP |
199 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when | 201 | /* The performance counters used by NMI_LOCAL_APIC don't trigger when |
200 | * the CPU is idle. To make sure the NMI watchdog really ticks on all | 202 | * the CPU is idle. To make sure the NMI watchdog really ticks on all |
@@ -202,7 +204,6 @@ static __cpuinit inline int nmi_known_cpu(void) | |||
202 | */ | 204 | */ |
203 | static __init void nmi_cpu_busy(void *data) | 205 | static __init void nmi_cpu_busy(void *data) |
204 | { | 206 | { |
205 | volatile int *endflag = data; | ||
206 | local_irq_enable_in_hardirq(); | 207 | local_irq_enable_in_hardirq(); |
207 | /* Intentionally don't use cpu_relax here. This is | 208 | /* Intentionally don't use cpu_relax here. This is |
208 | to make sure that the performance counter really ticks, | 209 | to make sure that the performance counter really ticks, |
@@ -210,14 +211,13 @@ static __init void nmi_cpu_busy(void *data) | |||
210 | pause instruction. On a real HT machine this is fine because | 211 | pause instruction. On a real HT machine this is fine because |
211 | all other CPUs are busy with "useless" delay loops and don't | 212 | all other CPUs are busy with "useless" delay loops and don't |
212 | care if they get somewhat less cycles. */ | 213 | care if they get somewhat less cycles. */ |
213 | while (*endflag == 0) | 214 | while (endflag == 0) |
214 | barrier(); | 215 | mb(); |
215 | } | 216 | } |
216 | #endif | 217 | #endif |
217 | 218 | ||
218 | static int __init check_nmi_watchdog(void) | 219 | static int __init check_nmi_watchdog(void) |
219 | { | 220 | { |
220 | volatile int endflag = 0; | ||
221 | unsigned int *prev_nmi_count; | 221 | unsigned int *prev_nmi_count; |
222 | int cpu; | 222 | int cpu; |
223 | 223 | ||