[PATCH 2/8] NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c

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


* Use nr_cpu_ids instead of NR_CPUS to limit traversal of cpu online map.

Applies to both tip/master and linux-next.

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

--- linux-2.6.tip.orig/arch/x86/kernel/cpu/proc.c
+++ linux-2.6.tip/arch/x86/kernel/cpu/proc.c
@@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m,
{
if (*pos == 0) /* just in case, cpu 0 is not the first */
*pos = first_cpu(cpu_online_map);
- if ((*pos) < NR_CPUS && cpu_online(*pos))
+ if ((*pos) < nr_cpu_ids && cpu_online(*pos))
return &cpu_data(*pos);
return NULL;
}

--
--
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/