aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/numa.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-10-21 09:21:09 +0200
committerJan Beulich <jbeulich@suse.com>2011-10-21 09:21:09 +0200
commit4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d (patch)
tree495538ea99a0b2c90eb6f18c87fd48fab2f4ec3e /xen/arch/x86/numa.c
parent3cfbbfcf4cb1d4fecfd1c9a8bab090bdb61e993e (diff)
downloadxen-4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d.tar.gz
xen-4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d.tar.bz2
xen-4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d.zip
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>
Diffstat (limited to 'xen/arch/x86/numa.c')
-rw-r--r--xen/arch/x86/numa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index 61b5904a2c..83e9ee38bc 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -282,7 +282,7 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
node_set_online(0);
for (i = 0; i < nr_cpu_ids; i++)
numa_set_node(i, 0);
- node_to_cpumask[0] = cpumask_of_cpu(0);
+ cpumask_copy(&node_to_cpumask[0], cpumask_of(0));
setup_node_bootmem(0, (u64)start_pfn << PAGE_SHIFT, (u64)end_pfn << PAGE_SHIFT);
}