diff options
author | Mike Travis <travis@sgi.com> | 2008-12-31 21:08:46 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-03 13:00:55 -0500 |
commit | 9628937d5b37169151c5f6bbd40919c6ac958a46 (patch) | |
tree | 09e49f6960806e4115b3345ccc4b5745ca784074 /arch/x86/kernel/apic.c | |
parent | 6ca09dfc9f180d038dcef93c167a833f43a8246f (diff) |
x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
Impact: Reduce future system panics due to cpumask operations using NR_CPUS
Insure that code does not look at bits >= nr_cpu_ids as when cpumasks are
allocated based on nr_cpu_ids, these extra bits will not be defined.
Also some other minor updates:
* change in to use cpu accessor function set_cpu_present() instead of
directly accessing cpu_present_map w/cpu_clear() [arch/x86/kernel/reboot.c]
* use cpumask_of() instead of &cpumask_of_cpu() [arch/x86/kernel/reboot.c]
* optimize some cpu_mask_to_apicid_and functions.
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic.c')
-rw-r--r-- | arch/x86/kernel/apic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 6b7f824db160..99589245fd8d 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -140,7 +140,7 @@ static int lapic_next_event(unsigned long delta, | |||
140 | struct clock_event_device *evt); | 140 | struct clock_event_device *evt); |
141 | static void lapic_timer_setup(enum clock_event_mode mode, | 141 | static void lapic_timer_setup(enum clock_event_mode mode, |
142 | struct clock_event_device *evt); | 142 | struct clock_event_device *evt); |
143 | static void lapic_timer_broadcast(const cpumask_t *mask); | 143 | static void lapic_timer_broadcast(const struct cpumask *mask); |
144 | static void apic_pm_activate(void); | 144 | static void apic_pm_activate(void); |
145 | 145 | ||
146 | /* | 146 | /* |
@@ -453,7 +453,7 @@ static void lapic_timer_setup(enum clock_event_mode mode, | |||
453 | /* | 453 | /* |
454 | * Local APIC timer broadcast function | 454 | * Local APIC timer broadcast function |
455 | */ | 455 | */ |
456 | static void lapic_timer_broadcast(const cpumask_t *mask) | 456 | static void lapic_timer_broadcast(const struct cpumask *mask) |
457 | { | 457 | { |
458 | #ifdef CONFIG_SMP | 458 | #ifdef CONFIG_SMP |
459 | send_IPI_mask(mask, LOCAL_TIMER_VECTOR); | 459 | send_IPI_mask(mask, LOCAL_TIMER_VECTOR); |