diff options
author | Don Zickus <dzickus@redhat.com> | 2011-10-13 15:14:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-05 06:00:23 -0500 |
commit | bda62633983f9db49ce0b1a9235b3709c1cda5f0 (patch) | |
tree | a19384bfa63d4341ee28776ed7554444495ffbb2 /arch/x86/kernel/smp.c | |
parent | 99e8b9ca90d688c3ac7d3a141b701c9694a93925 (diff) |
x86, NMI: Add knob to disable using NMI IPIs to stop cpus
Some machines may exhibit problems using the NMI to stop other
cpus. This knob just allows one to revert back to the original
behaviour to help diagnose the problem.
V2:
make function static
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
Cc: seiji.aguchi@hds.com
Cc: vgoyal@redhat.com
Cc: mjg@redhat.com
Cc: tony.luck@intel.com
Cc: gong.chen@intel.com
Cc: satoru.moriya@hds.com
Cc: avi@redhat.com
Cc: Andi Kleen <andi@firstfloor.org>
Link: http://lkml.kernel.org/r/1318533267-18880-4-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smp.c')
-rw-r--r-- | arch/x86/kernel/smp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index e72b1754a2d7..113acda5879e 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -249,6 +249,11 @@ static void native_irq_stop_other_cpus(int wait) | |||
249 | local_irq_restore(flags); | 249 | local_irq_restore(flags); |
250 | } | 250 | } |
251 | 251 | ||
252 | static void native_smp_disable_nmi_ipi(void) | ||
253 | { | ||
254 | smp_ops.stop_other_cpus = native_irq_stop_other_cpus; | ||
255 | } | ||
256 | |||
252 | /* | 257 | /* |
253 | * Reschedule call back. | 258 | * Reschedule call back. |
254 | */ | 259 | */ |
@@ -280,6 +285,14 @@ void smp_call_function_single_interrupt(struct pt_regs *regs) | |||
280 | irq_exit(); | 285 | irq_exit(); |
281 | } | 286 | } |
282 | 287 | ||
288 | static int __init nonmi_ipi_setup(char *str) | ||
289 | { | ||
290 | native_smp_disable_nmi_ipi(); | ||
291 | return 1; | ||
292 | } | ||
293 | |||
294 | __setup("nonmi_ipi", nonmi_ipi_setup); | ||
295 | |||
283 | struct smp_ops smp_ops = { | 296 | struct smp_ops smp_ops = { |
284 | .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, | 297 | .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, |
285 | .smp_prepare_cpus = native_smp_prepare_cpus, | 298 | .smp_prepare_cpus = native_smp_prepare_cpus, |