X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Fsmp.c;h=9910744f0856c5a084b4f9721dca09f376415645;hb=c726b822131e7fdb62745a5585449e6a159395e8;hp=2fe66f7c617abe17508c7dcfce1125ff5346b0c8;hpb=225c8e010f2d17a62aef131e24c6e7c111f36f9b;p=mv-sheeva.git diff --git a/kernel/smp.c b/kernel/smp.c index 2fe66f7c617..9910744f085 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -459,7 +459,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); @@ -572,17 +572,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; }