diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-13 05:47:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-13 05:47:34 -0400 |
commit | 641cd4cfcdc71ce01535b31cc4d57d59a1fae1fc (patch) | |
tree | 84c088d12e68a53cdde2faba49dc01e1b981598b /kernel/smp.c | |
parent | 25d500067d5a666d1336598d1b324793554e5496 (diff) |
generic-ipi: eliminate WARN_ON()s during oops/panic
Do not output smp-call related warnings in the oops/panic codepath.
Reported-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <49B91A7E.76E4.0078.0@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/smp.c')
-rw-r--r-- | kernel/smp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 7ad2262d2eca..858baac568ee 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/rcupdate.h> | 6 | #include <linux/rcupdate.h> |
7 | #include <linux/rculist.h> | 7 | #include <linux/rculist.h> |
8 | #include <linux/kernel.h> | ||
8 | #include <linux/module.h> | 9 | #include <linux/module.h> |
9 | #include <linux/percpu.h> | 10 | #include <linux/percpu.h> |
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
@@ -285,7 +286,7 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | |||
285 | this_cpu = get_cpu(); | 286 | this_cpu = get_cpu(); |
286 | 287 | ||
287 | /* Can deadlock when called with interrupts disabled */ | 288 | /* Can deadlock when called with interrupts disabled */ |
288 | WARN_ON(irqs_disabled()); | 289 | WARN_ON_ONCE(irqs_disabled() && !oops_in_progress); |
289 | 290 | ||
290 | if (cpu == this_cpu) { | 291 | if (cpu == this_cpu) { |
291 | local_irq_save(flags); | 292 | local_irq_save(flags); |
@@ -329,7 +330,7 @@ void __smp_call_function_single(int cpu, struct call_single_data *data, | |||
329 | csd_lock(data); | 330 | csd_lock(data); |
330 | 331 | ||
331 | /* Can deadlock when called with interrupts disabled */ | 332 | /* Can deadlock when called with interrupts disabled */ |
332 | WARN_ON(wait && irqs_disabled()); | 333 | WARN_ON_ONCE(wait && irqs_disabled() && !oops_in_progress); |
333 | 334 | ||
334 | generic_exec_single(cpu, data, wait); | 335 | generic_exec_single(cpu, data, wait); |
335 | } | 336 | } |
@@ -365,7 +366,7 @@ void smp_call_function_many(const struct cpumask *mask, | |||
365 | int cpu, next_cpu, this_cpu = smp_processor_id(); | 366 | int cpu, next_cpu, this_cpu = smp_processor_id(); |
366 | 367 | ||
367 | /* Can deadlock when called with interrupts disabled */ | 368 | /* Can deadlock when called with interrupts disabled */ |
368 | WARN_ON(irqs_disabled()); | 369 | WARN_ON_ONCE(irqs_disabled() && !oops_in_progress); |
369 | 370 | ||
370 | /* So, what's a CPU they want? Ignoring this one. */ | 371 | /* So, what's a CPU they want? Ignoring this one. */ |
371 | cpu = cpumask_first_and(mask, cpu_online_mask); | 372 | cpu = cpumask_first_and(mask, cpu_online_mask); |