aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/schedule.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/schedule.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/schedule.c')
-rw-r--r--xen/common/schedule.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 54658adca1..c494017fc5 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -77,9 +77,7 @@ static struct scheduler __read_mostly ops;
#define DOM2OP(_d) (((_d)->cpupool == NULL) ? &ops : ((_d)->cpupool->sched))
#define VCPU2OP(_v) (DOM2OP((_v)->domain))
-#define VCPU2ONLINE(_v) \
- (((_v)->domain->cpupool == NULL) ? &cpu_online_map \
- : (_v)->domain->cpupool->cpu_valid)
+#define VCPU2ONLINE(_v) cpupool_online_cpumask((_v)->domain->cpupool)
static inline void trace_runstate_change(struct vcpu *v, int new_state)
{
@@ -1418,7 +1416,7 @@ void schedule_dump(struct cpupool *c)
cpumask_t *cpus;
sched = (c == NULL) ? &ops : c->sched;
- cpus = (c == NULL) ? &cpupool_free_cpus : c->cpu_valid;
+ cpus = cpupool_scheduler_cpumask(c);
printk("Scheduler: %s (%s)\n", sched->name, sched->opt_name);
SCHED_OP(sched, dump_settings);