eliminate direct assignments of CPU masks
authorJan Beulich <jbeulich@suse.com>
Fri, 21 Oct 2011 07:21:09 +0000 (09:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 21 Oct 2011 07:21:09 +0000 (09:21 +0200)
commit4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d
tree495538ea99a0b2c90eb6f18c87fd48fab2f4ec3e
parent3cfbbfcf4cb1d4fecfd1c9a8bab090bdb61e993e
eliminate direct assignments of CPU masks

Use cpumask_copy() instead of direct variable assignments for copying
CPU masks. While direct assignments are not a problem when both sides
are variables actually defined as cpumask_t (except for possibly
copying *much* more than would actually need to be copied), they must
not happen when the original variable is of type cpumask_var_t (which
may have lass space allocated to it than a full cpumask_t). Eliminate
as many of such assignments as possible (in several cases it's even
possible to collapse two operations [copy then clear one bit] into one
[cpumask_andnot()]), and thus set the way for reducing the allocation
size in alloc_cpumask_var().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
12 files changed:
xen/arch/x86/acpi/cpufreq/powernow.c
xen/arch/x86/cpu/mtrr/main.c
xen/arch/x86/irq.c
xen/arch/x86/numa.c
xen/arch/x86/smp.c
xen/arch/x86/smpboot.c
xen/arch/x86/time.c
xen/common/keyhandler.c
xen/common/rcupdate.c
xen/common/stop_machine.c
xen/include/xen/cpumask.h
xen/include/xen/irq.h