NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c
authorMike Travis <travis@sgi.com>
Sat, 19 Jul 2008 01:11:28 +0000 (18:11 -0700)
committerIngo Molnar <mingo@elte.hu>
Sun, 20 Jul 2008 08:21:09 +0000 (10:21 +0200)
  * Use nr_cpu_ids instead of NR_CPUS to limit traversal of cpu online map.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/proc.c

index 0d0d9057e7c0b63b36591385d89397ff7322bd99..a26c480b94915a2b460c0963bf38f9693c911641 100644 (file)
@@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
 {
        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;
 }