MIPS: smp: Warn on too early irq enable
authorYong Zhang <yong.zhang@windriver.com>
Thu, 19 Jul 2012 07:13:53 +0000 (09:13 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 19 Jul 2012 09:23:44 +0000 (11:23 +0200)
Just to catch a potential issue.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: David Daney <david.daney@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/3852/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/smp.c

index eb3e2b1..1268392 100644 (file)
@@ -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();