Merge branches 'sched/rt' and 'sched/urgent' into sched/core
[linux-2.6.git] / kernel / sched_rt.c
index 48d1f6e..c79dc78 100644 (file)
@@ -1130,8 +1130,8 @@ static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask)
        if ((this_cpu != -1) && cpu_isset(this_cpu, *mask))
                return this_cpu;
 
-       first = first_cpu(*mask);
-       if (first != NR_CPUS)
+       first = cpumask_first(mask);
+       if (first < nr_cpu_ids)
                return first;
 
        return -1;