summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-07-15 17:44:02 +0200
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 20:31:55 +0200
commitae1b3d51c89a96c641111e2c103557592577cf51 (patch)
tree1aae0a75db788d079c5e79646082bec192709250 /arch/mips/kernel
parentAvoid SMP cacheflushes. This is a minor optimization of startup but (diff)
downloadlinux-ae1b3d51c89a96c641111e2c103557592577cf51.tar.xz
linux-ae1b3d51c89a96c641111e2c103557592577cf51.zip
Make sure that the processor is actually online or die spectacularly.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/smp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 25762917e822..798fce509398 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -142,6 +142,11 @@ int smp_call_function (void (*func) (void *info), void *info, int retry,
int i, cpus = num_online_cpus() - 1;
int cpu = smp_processor_id();
+ /*
+ * Can die spectacularly if this CPU isn't yet marked online
+ */
+ BUG_ON(!cpu_online(cpu));
+
if (!cpus)
return 0;