diff options
-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; |