aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-12-16 20:34:01 -0500
committerMike Travis <travis@sgi.com>2008-12-16 20:40:58 -0500
commit168ef543a43678146e06b3911e987ac021d575b8 (patch)
tree8539348b5144da9cace8bd7d56bf65d0a1f20554 /arch/x86/kernel/apic.c
parent78637a97b7fe1df51f40a460448df0b93d511176 (diff)
x86: prepare for cpumask iterators to only go to nr_cpu_ids
Impact: cleanup, futureproof In fact, all cpumask ops will only be valid (in general) for bit numbers < nr_cpu_ids. So use that instead of NR_CPUS in various places. This is always safe: no cpu number can be >= nr_cpu_ids, and nr_cpu_ids is initialized to NR_CPUS at boot. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic.c')
-rw-r--r--arch/x86/kernel/apic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index a375791c08ca..3b630ec24935 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -2106,7 +2106,7 @@ __cpuinit int apic_is_clustered_box(void)
2106 bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid); 2106 bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);
2107 bitmap_zero(clustermap, NUM_APIC_CLUSTERS); 2107 bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
2108 2108
2109 for (i = 0; i < NR_CPUS; i++) { 2109 for (i = 0; i < nr_cpu_ids; i++) {
2110 /* are we being called early in kernel startup? */ 2110 /* are we being called early in kernel startup? */
2111 if (bios_cpu_apicid) { 2111 if (bios_cpu_apicid) {
2112 id = bios_cpu_apicid[i]; 2112 id = bios_cpu_apicid[i];