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/arch/x86/traps.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/arch/x86/traps.c')
-rw-r--r-- | xen/arch/x86/traps.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 0203613b53..e22e6d86fc 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -3113,7 +3113,6 @@ static void nmi_mce_softirq(void) { int cpu = smp_processor_id(); struct softirq_trap *st = &per_cpu(softirq_trap, cpu); - cpumask_t affinity; BUG_ON(st == NULL); BUG_ON(st->vcpu == NULL); @@ -3129,9 +3128,7 @@ static void nmi_mce_softirq(void) * Make sure to wakeup the vcpu on the * specified processor. */ - cpus_clear(affinity); - cpu_set(st->processor, affinity); - vcpu_set_affinity(st->vcpu, &affinity); + vcpu_set_affinity(st->vcpu, cpumask_of(st->processor)); /* Affinity is restored in the iret hypercall. */ } @@ -3201,14 +3198,11 @@ void async_exception_cleanup(struct vcpu *curr) !test_and_set_bool(curr->mce_pending) ) { int cpu = smp_processor_id(); - cpumask_t affinity; cpumask_copy(curr->cpu_affinity_tmp, curr->cpu_affinity); - cpus_clear(affinity); - cpu_set(cpu, affinity); printk(XENLOG_DEBUG "MCE: CPU%d set affinity, old %d\n", cpu, curr->processor); - vcpu_set_affinity(curr, &affinity); + vcpu_set_affinity(curr, cpumask_of(cpu)); } } } |