From: Yong Zhang Date: Thu, 19 Jul 2012 07:13:53 +0000 (+0200) Subject: MIPS: smp: Warn on too early irq enable X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b789ad63ac46b00f0862bdc23fc95556adc3cf2f;p=linux-beck.git MIPS: smp: Warn on too early irq enable Just to catch a potential issue. Signed-off-by: Yong Zhang Cc: Sergei Shtylyov Cc: David Daney Acked-by: David Daney Patchwork: https://patchwork.linux-mips.org/patch/3852/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index eb3e2b112a0d..1268392f1d27 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -130,6 +130,11 @@ asmlinkage __cpuinit void start_secondary(void) synchronise_count_slave(); + /* + * irq will be enabled in ->smp_finish(), enabling it too early + * is dangerous. + */ + WARN_ON_ONCE(!irqs_disabled()); mp_ops->smp_finish(); cpu_idle();