introduce and use nr_cpu_ids and nr_cpumask_bits
authorJan Beulich <jbeulich@suse.com>
Fri, 21 Oct 2011 07:17:42 +0000 (09:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 21 Oct 2011 07:17:42 +0000 (09:17 +0200)
commit20307695e5c22a58b4cce35fba5333375da5a7fa
tree65584141fd42e108c6feca25eec190526cb01eac
parenta8a8a52a27513b35d1c6aa2d542074f99849ac3d
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>
29 files changed:
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/acpi/cpufreq/cpufreq.c
xen/arch/x86/acpi/lib.c
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/mcheck/mce.c
xen/arch/x86/microcode.c
xen/arch/x86/mpparse.c
xen/arch/x86/numa.c
xen/arch/x86/oprofile/nmi_int.c
xen/arch/x86/platform_hypercall.c
xen/arch/x86/setup.c
xen/arch/x86/smpboot.c
xen/arch/x86/srat.c
xen/arch/x86/sysctl.c
xen/arch/x86/tboot.c
xen/arch/x86/traps.c
xen/common/cpu.c
xen/common/cpupool.c
xen/common/domain.c
xen/common/kexec.c
xen/common/keyhandler.c
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_sedf.c
xen/common/schedule.c
xen/common/sysctl.c
xen/drivers/acpi/pmstat.c
xen/include/asm-x86/setup.h
xen/include/xen/cpumask.h