Merge branch 'linus' into x86/x2apic
[sfrench/cifs-2.6.git] / arch / x86 / kernel / genx2apic_uv_x.c
index 169388c4cce9793a0715c3643f4004a9fa59a7a9..3fe472223a993b88ed95a8bea114466cdc488e62 100644 (file)
@@ -127,7 +127,7 @@ static void uv_send_IPI_mask(cpumask_t mask, int vector)
 {
        unsigned int cpu;
 
-       for (cpu = 0; cpu < NR_CPUS; ++cpu)
+       for_each_possible_cpu(cpu)
                if (cpu_isset(cpu, mask))
                        uv_send_IPI_one(cpu, vector);
 }
@@ -165,7 +165,7 @@ static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask)
         * May as well be the first.
         */
        cpu = first_cpu(cpumask);
-       if ((unsigned)cpu < NR_CPUS)
+       if ((unsigned)cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
        else
                return BAD_APICID;