diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-10-21 09:17:42 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-10-21 09:17:42 +0200 |
commit | 20307695e5c22a58b4cce35fba5333375da5a7fa (patch) | |
tree | 65584141fd42e108c6feca25eec190526cb01eac /xen/arch/x86/srat.c | |
parent | a8a8a52a27513b35d1c6aa2d542074f99849ac3d (diff) | |
download | xen-20307695e5c22a58b4cce35fba5333375da5a7fa.tar.gz xen-20307695e5c22a58b4cce35fba5333375da5a7fa.tar.bz2 xen-20307695e5c22a58b4cce35fba5333375da5a7fa.zip |
introduce and use nr_cpu_ids and nr_cpumask_bits
The former is the runtime equivalent of NR_CPUS (and users of NR_CPUS,
where necessary, get adjusted accordingly), while the latter is for the
sole use of determining the allocation size when dynamically allocating
CPU masks (done later in this series).
Adjust accessors to use either of the two to bound their bitmap
operations - which one gets used depends on whether accessing the bits
in the gap between nr_cpu_ids and nr_cpumask_bits is benign but more
efficient.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/srat.c')
-rw-r--r-- | xen/arch/x86/srat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c index bc857d5b29..20cfedba3c 100644 --- a/xen/arch/x86/srat.c +++ b/xen/arch/x86/srat.c @@ -447,7 +447,7 @@ int __init acpi_scan_nodes(u64 start, u64 end) continue; setup_node_bootmem(i, nodes[i].start, nodes[i].end); } - for (i = 0; i < NR_CPUS; i++) { + for (i = 0; i < nr_cpu_ids; i++) { if (cpu_to_node[i] == NUMA_NO_NODE) continue; if (!node_isset(cpu_to_node[i], nodes_parsed)) |