aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/oprofile
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-10-21 09:17:42 +0200
committerJan Beulich <jbeulich@suse.com>2011-10-21 09:17:42 +0200
commit20307695e5c22a58b4cce35fba5333375da5a7fa (patch)
tree65584141fd42e108c6feca25eec190526cb01eac /xen/arch/x86/oprofile
parenta8a8a52a27513b35d1c6aa2d542074f99849ac3d (diff)
downloadxen-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/oprofile')
-rw-r--r--xen/arch/x86/oprofile/nmi_int.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c
index eba9dec64d..70930b245a 100644
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -127,7 +127,7 @@ static void nmi_save_registers(void * dummy)
static void free_msrs(void)
{
int i;
- for (i = 0; i < NR_CPUS; ++i) {
+ for (i = 0; i < nr_cpu_ids; ++i) {
xfree(cpu_msrs[i].counters);
cpu_msrs[i].counters = NULL;
xfree(cpu_msrs[i].controls);