aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/sched_sedf.c
diff options
context:
space:
mode:
authorJuergen Gross <juergen.gross@ts.fujitsu.com>2012-01-24 14:19:58 +0000
committerJuergen Gross <juergen.gross@ts.fujitsu.com>2012-01-24 14:19:58 +0000
commit9b80635f9dd46b584f04c8e948a71c48bd412f96 (patch)
tree65d633f3bdd797f2207ecd2fef863ccf48c2d07c /xen/common/sched_sedf.c
parent04b9829949d79e753c8047f4ef620a82b1743349 (diff)
downloadxen-9b80635f9dd46b584f04c8e948a71c48bd412f96.tar.gz
xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.tar.bz2
xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.zip
introduce and use common macros for selecting cpupool based cpumasks
There are several instances of the same construct finding the cpumask for a cpupool. Use macros instead. Signed-off-by: juergen.gross@ts.fujitsu.com Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/sched_sedf.c')
-rw-r--r--xen/common/sched_sedf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xen/common/sched_sedf.c b/xen/common/sched_sedf.c
index 11b0af4775..644787bc7f 100644
--- a/xen/common/sched_sedf.c
+++ b/xen/common/sched_sedf.c
@@ -13,9 +13,6 @@
#include <xen/time.h>
#include <xen/errno.h>
-#define SEDF_CPUONLINE(_pool) \
- (((_pool) == NULL) ? &cpupool_free_cpus : (_pool)->cpu_valid)
-
#ifndef NDEBUG
#define SEDF_STATS
#define CHECK(_p) \
@@ -397,7 +394,7 @@ static int sedf_pick_cpu(const struct scheduler *ops, struct vcpu *v)
cpumask_t online_affinity;
cpumask_t *online;
- online = SEDF_CPUONLINE(v->domain->cpupool);
+ online = cpupool_scheduler_cpumask(v->domain->cpupool);
cpumask_and(&online_affinity, v->cpu_affinity, online);
return cpumask_first(&online_affinity);
}
@@ -801,7 +798,8 @@ static struct task_slice sedf_do_schedule(
*/
if ( tasklet_work_scheduled ||
(list_empty(runq) && list_empty(waitq)) ||
- unlikely(!cpumask_test_cpu(cpu, SEDF_CPUONLINE(per_cpu(cpupool, cpu)))) )
+ unlikely(!cpumask_test_cpu(cpu,
+ cpupool_scheduler_cpumask(per_cpu(cpupool, cpu)))) )
{
ret.task = IDLETASK(cpu);
ret.time = SECONDS(1);