diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-13 10:00:13 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-13 10:00:13 +0200 |
commit | b569c46bb3153903d59f3eeefc19ee046dab75e0 (patch) | |
tree | 53c94fb97f7fc70e658ac6d529e7ae9ab89b055b /xen/common/schedule.c | |
parent | 2a869011d4ee6e0adf5246734d148e7ad68a0d84 (diff) | |
download | xen-b569c46bb3153903d59f3eeefc19ee046dab75e0.tar.gz xen-b569c46bb3153903d59f3eeefc19ee046dab75e0.tar.bz2 xen-b569c46bb3153903d59f3eeefc19ee046dab75e0.zip |
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 <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/schedule.c')
-rw-r--r-- | xen/common/schedule.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |