summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorMike Travis2009-01-01 03:08:46 +0100
committerIngo Molnar2009-01-03 19:00:55 +0100
commit9628937d5b37169151c5f6bbd40919c6ac958a46 (patch)
tree09e49f6960806e4115b3345ccc4b5745ca784074 /arch/x86/kernel/smpboot.c
parentsched: put back some stack hog changes that were undone in kernel/sched.c (diff)
downloadkernel-qcow2-linux-9628937d5b37169151c5f6bbd40919c6ac958a46.tar.gz
kernel-qcow2-linux-9628937d5b37169151c5f6bbd40919c6ac958a46.tar.xz
kernel-qcow2-linux-9628937d5b37169151c5f6bbd40919c6ac958a46.zip
x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
Impact: Reduce future system panics due to cpumask operations using NR_CPUS Insure that code does not look at bits >= nr_cpu_ids as when cpumasks are allocated based on nr_cpu_ids, these extra bits will not be defined. Also some other minor updates: * change in to use cpu accessor function set_cpu_present() instead of directly accessing cpu_present_map w/cpu_clear() [arch/x86/kernel/reboot.c] * use cpumask_of() instead of &cpumask_of_cpu() [arch/x86/kernel/reboot.c] * optimize some cpu_mask_to_apicid_and functions. Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f49c26bd7e2d..6bd4d9b73870 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1154,7 +1154,7 @@ static void __init smp_cpu_index_default(void)
for_each_possible_cpu(i) {
c = &cpu_data(i);
/* mark all to hotplug */
- c->cpu_index = NR_CPUS;
+ c->cpu_index = nr_cpu_ids;
}
}