Commit 247bc6ca authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar

NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genx2apic_uv_x.c

  * Replace NR_CPUS loop with for_each_possible_cpu().

  * nr_cpu_ids should be used to determine if a percpu area is
    available for a given cpu.
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f2ad47ff
...@@ -94,7 +94,7 @@ static void uv_send_IPI_mask(cpumask_t mask, int vector) ...@@ -94,7 +94,7 @@ static void uv_send_IPI_mask(cpumask_t mask, int vector)
{ {
unsigned int cpu; unsigned int cpu;
for (cpu = 0; cpu < NR_CPUS; ++cpu) for_each_possible_cpu(cpu)
if (cpu_isset(cpu, mask)) if (cpu_isset(cpu, mask))
uv_send_IPI_one(cpu, vector); uv_send_IPI_one(cpu, vector);
} }
...@@ -128,7 +128,7 @@ static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask) ...@@ -128,7 +128,7 @@ static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask)
* May as well be the first. * May as well be the first.
*/ */
cpu = first_cpu(cpumask); cpu = first_cpu(cpumask);
if ((unsigned)cpu < NR_CPUS) if ((unsigned)cpu < nr_cpu_ids)
return per_cpu(x86_cpu_to_apicid, cpu); return per_cpu(x86_cpu_to_apicid, cpu);
else else
return BAD_APICID; return BAD_APICID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment