[PATCH 4/8] NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c

From: Mike Travis
Date: Fri Jul 18 2008 - 21:12:47 EST


* nr_cpu_ids should be used to determine if a percpu area is
available for a given cpu.

Applies to both tip/master and linux-next.

Signed-off-by: Mike Travis <travis@xxxxxxx>
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
---
arch/x86/kernel/genapic_flat_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.tip.orig/arch/x86/kernel/genapic_flat_64.c
+++ linux-2.6.tip/arch/x86/kernel/genapic_flat_64.c
@@ -168,7 +168,7 @@ static unsigned int physflat_cpu_mask_to
* 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;

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/