From 973da35f1cf3050b17b415796331c5a62aeff442 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 20 Jan 2011 12:07:13 +0100 Subject: [PATCH] --- yaml --- r: 232030 b: refs/heads/master c: bd924e8cbd4b73ffb7d707a774c04f7e2cae88ed h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/smp.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a5d7a2c3c4dd..27099fb062fa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ce802f62ba32a7d95748ac92bf351f76affb6ff +refs/heads/master: bd924e8cbd4b73ffb7d707a774c04f7e2cae88ed diff --git a/trunk/kernel/smp.c b/trunk/kernel/smp.c index 4ec30e069987..4b83cd6815e2 100644 --- a/trunk/kernel/smp.c +++ b/trunk/kernel/smp.c @@ -430,7 +430,7 @@ void smp_call_function_many(const struct cpumask *mask, * can't happen. */ WARN_ON_ONCE(cpu_online(this_cpu) && irqs_disabled() - && !oops_in_progress); + && !oops_in_progress && !early_boot_irqs_disabled); /* So, what's a CPU they want? Ignoring this one. */ cpu = cpumask_first_and(mask, cpu_online_mask); @@ -533,17 +533,20 @@ void ipi_call_unlock_irq(void) #endif /* USE_GENERIC_SMP_HELPERS */ /* - * Call a function on all processors + * Call a function on all processors. May be used during early boot while + * early_boot_irqs_disabled is set. Use local_irq_save/restore() instead + * of local_irq_disable/enable(). */ int on_each_cpu(void (*func) (void *info), void *info, int wait) { + unsigned long flags; int ret = 0; preempt_disable(); ret = smp_call_function(func, info, wait); - local_irq_disable(); + local_irq_save(flags); func(info); - local_irq_enable(); + local_irq_restore(flags); preempt_enable(); return ret; }