aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/cpudeadline.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-22 12:12:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-22 12:12:50 -0800
commit5580723faa4f8e68423e148db8bc8ca19013530f (patch)
treeb6b2f065301d6d85440a75e03ffdd204e7fc41b9 /kernel/sched/cpudeadline.c
parentMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parentsched/deadline: Remove useless dl_nr_total (diff)
downloadlinux-dev-5580723faa4f8e68423e148db8bc8ca19013530f.tar.xz
linux-dev-5580723faa4f8e68423e148db8bc8ca19013530f.zip
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar: "Misc fixlets: a fair number of them resulting from the new SCHED_DEADLINE code" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Remove useless dl_nr_total sched/deadline: Test for CPU's presence explicitly sched: Add 'flags' argument to sched_{set,get}attr() syscalls sched: Fix information leak in sys_sched_getattr() sched,numa: add cond_resched to task_numa_work sched/core: Make dl_b->lock IRQ safe sched/core: Fix sched_rt_global_validate sched/deadline: Fix overflow to handle period==0 and deadline!=0 sched/deadline: Fix bad accounting of nr_running
Diffstat (limited to 'kernel/sched/cpudeadline.c')
-rw-r--r--kernel/sched/cpudeadline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
index 045fc74e3f09..5b8838b56d1c 100644
--- a/kernel/sched/cpudeadline.c
+++ b/kernel/sched/cpudeadline.c
@@ -70,7 +70,7 @@ static void cpudl_heapify(struct cpudl *cp, int idx)
static void cpudl_change_key(struct cpudl *cp, int idx, u64 new_dl)
{
- WARN_ON(idx > num_present_cpus() || idx == IDX_INVALID);
+ WARN_ON(!cpu_present(idx) || idx == IDX_INVALID);
if (dl_time_before(new_dl, cp->elements[idx].dl)) {
cp->elements[idx].dl = new_dl;
@@ -117,7 +117,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
}
out:
- WARN_ON(best_cpu > num_present_cpus() && best_cpu != -1);
+ WARN_ON(!cpu_present(best_cpu) && best_cpu != -1);
return best_cpu;
}
@@ -137,7 +137,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl, int is_valid)
int old_idx, new_cpu;
unsigned long flags;
- WARN_ON(cpu > num_present_cpus());
+ WARN_ON(!cpu_present(cpu));
raw_spin_lock_irqsave(&cp->lock, flags);
old_idx = cp->cpu_to_idx[cpu];