From: Mike Travis Date: Sat, 19 Jul 2008 01:11:30 +0000 (-0700) Subject: NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c X-Git-Tag: v2.6.27-rc1~848^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1bd9d6b64e1474f1a03f8660e8721d746cffae57;p=linux-2.6-omap-h63xx.git NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c * nr_cpu_ids should be used to determine if a percpu area is available for a given cpu. Signed-off-by: Mike Travis Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c index 1a9c68845ee..786548a62d3 100644 --- a/arch/x86/kernel/genapic_flat_64.c +++ b/arch/x86/kernel/genapic_flat_64.c @@ -168,7 +168,7 @@ static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask) * May as well be the first. */ cpu = first_cpu(cpumask); - if ((unsigned)cpu < NR_CPUS) + if ((unsigned)cpu < nr_cpu_ids) return per_cpu(x86_cpu_to_apicid, cpu); else return BAD_APICID;