diff options
author | Mike Travis <travis@sgi.com> | 2008-07-18 21:11:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-20 04:21:09 -0400 |
commit | 247bc6ca0f691e4617e7bdb70cbaccc939f754ec (patch) | |
tree | a1069c2fcb70564db43e3351680f32544666d3c8 /arch | |
parent | f2ad47ffeb1d292b7c7d1e2f6aedb37646c391db (diff) |
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: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/genx2apic_uv_x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c index 711f11c30b06..3e5d7b8698f9 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/genx2apic_uv_x.c | |||
@@ -94,7 +94,7 @@ static void uv_send_IPI_mask(cpumask_t mask, int vector) | |||
94 | { | 94 | { |
95 | unsigned int cpu; | 95 | unsigned int cpu; |
96 | 96 | ||
97 | for (cpu = 0; cpu < NR_CPUS; ++cpu) | 97 | for_each_possible_cpu(cpu) |
98 | if (cpu_isset(cpu, mask)) | 98 | if (cpu_isset(cpu, mask)) |
99 | uv_send_IPI_one(cpu, vector); | 99 | uv_send_IPI_one(cpu, vector); |
100 | } | 100 | } |
@@ -128,7 +128,7 @@ static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask) | |||
128 | * May as well be the first. | 128 | * May as well be the first. |
129 | */ | 129 | */ |
130 | cpu = first_cpu(cpumask); | 130 | cpu = first_cpu(cpumask); |
131 | if ((unsigned)cpu < NR_CPUS) | 131 | if ((unsigned)cpu < nr_cpu_ids) |
132 | return per_cpu(x86_cpu_to_apicid, cpu); | 132 | return per_cpu(x86_cpu_to_apicid, cpu); |
133 | else | 133 | else |
134 | return BAD_APICID; | 134 | return BAD_APICID; |