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/traps.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/traps.c')
-rw-r--r-- | xen/arch/x86/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index eecdb4d201..a8bad8f7fc 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -3412,7 +3412,7 @@ static void __set_intr_gate(unsigned int n, uint32_t dpl, void *addr) { int i; /* Keep secondary tables in sync with IRQ updates. */ - for ( i = 1; i < NR_CPUS; i++ ) + for ( i = 1; i < nr_cpu_ids; i++ ) if ( idt_tables[i] != NULL ) _set_gate(&idt_tables[i][n], 14, dpl, addr); _set_gate(&idt_table[n], 14, dpl, addr); |