From fbaa8d955542d636f853f783f4f8048f46aca5e0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Jan 2009 10:12:19 +1030 Subject: [PATCH] --- yaml --- r: 125688 b: refs/heads/master c: e0c0ba736547e81c4f986ce192307c549d214167 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/init/main.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 73a1cb5e6ab1..529220bc2fe4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ab53d472e785e51fdfc08fc1d66252c1153e6c0f +refs/heads/master: e0c0ba736547e81c4f986ce192307c549d214167 diff --git a/trunk/init/main.c b/trunk/init/main.c index 84d3732c0ce5..546ebd2f44ba 100644 --- a/trunk/init/main.c +++ b/trunk/init/main.c @@ -380,12 +380,7 @@ EXPORT_SYMBOL(nr_cpu_ids); /* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */ static void __init setup_nr_cpu_ids(void) { - int cpu, highest_cpu = 0; - - for_each_possible_cpu(cpu) - highest_cpu = cpu; - - nr_cpu_ids = highest_cpu + 1; + nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; } #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA