From be3780d4f03fa8bfe16eeecac656644ce931ad03 Mon Sep 17 00:00:00 2001 From: Kevin Corry Date: Wed, 1 Aug 2007 06:19:46 +1000 Subject: [PATCH] --- yaml --- r: 63656 b: refs/heads/master c: 17aa3a82aa2173a22405f862c4444656f0494a3f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/smp.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 2d76d0219ee7..bbbb4d888b9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cba684f56d7e8b82b08d4372375a42d6ebeab47d +refs/heads/master: 17aa3a82aa2173a22405f862c4444656f0494a3f diff --git a/trunk/arch/powerpc/kernel/smp.c b/trunk/arch/powerpc/kernel/smp.c index 087c92f2a3eb..1ea43160f543 100644 --- a/trunk/arch/powerpc/kernel/smp.c +++ b/trunk/arch/powerpc/kernel/smp.c @@ -212,11 +212,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic, atomic_set(&data.finished, 0); spin_lock(&call_lock); - /* Must grab online cpu count with preempt disabled, otherwise - * it can change. */ - num_cpus = num_online_cpus() - 1; - if (!num_cpus) - goto done; /* remove 'self' from the map */ if (cpu_isset(smp_processor_id(), map)) @@ -224,7 +219,9 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic, /* sanity check the map, remove any non-online processors. */ cpus_and(map, map, cpu_online_map); - if (cpus_empty(map)) + + num_cpus = cpus_weight(map); + if (!num_cpus) goto done; call_data = &data;