From b569c46bb3153903d59f3eeefc19ee046dab75e0 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 13 Oct 2011 10:00:13 +0200 Subject: constify vcpu_set_affinity()'s second parameter None of the callers actually make use of the function's returning of the old affinity through its second parameter, and eliminating this capability allows some callers to no longer use a local variable here, reducing their stack footprint significantly when building with large NR_CPUS. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- xen/common/schedule.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xen/common/schedule.c') diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 105961ed5b..e909eec39d 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -587,9 +587,9 @@ int cpu_disable_scheduler(unsigned int cpu) return ret; } -int vcpu_set_affinity(struct vcpu *v, cpumask_t *affinity) +int vcpu_set_affinity(struct vcpu *v, const cpumask_t *affinity) { - cpumask_t online_affinity, old_affinity; + cpumask_t online_affinity; cpumask_t *online; if ( v->domain->is_pinned ) @@ -601,9 +601,7 @@ int vcpu_set_affinity(struct vcpu *v, cpumask_t *affinity) vcpu_schedule_lock_irq(v); - cpumask_copy(&old_affinity, v->cpu_affinity); cpumask_copy(v->cpu_affinity, affinity); - cpumask_copy(affinity, &old_affinity); if ( !cpumask_test_cpu(v->processor, v->cpu_affinity) ) set_bit(_VPF_migrating, &v->pause_flags); -- cgit v1.2.3