diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2008-08-09 15:09:02 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 10:37:34 +0200 |
commit | d388e5fdc461344d04307a3fa83862b9ed429647 (patch) | |
tree | 61a9a4311b165038423a0f3412e93b8811796c6b /include/asm-x86 | |
parent | 31343d8a5079cda57ffd539fcf4f00cea344fe98 (diff) | |
download | linux-3.10-d388e5fdc461344d04307a3fa83862b9ed429647.tar.gz linux-3.10-d388e5fdc461344d04307a3fa83862b9ed429647.tar.bz2 linux-3.10-d388e5fdc461344d04307a3fa83862b9ed429647.zip |
x86: Restore proper vector locking during cpu hotplug
Having cpu_online_map change during assign_irq_vector can result
in some really nasty and weird things happening. The one that
bit me last time was accessing non existent per cpu memory for non
existent cpus.
This locking was removed in a sloppy x86_64 and x86_32 merge patch.
Guys can we please try and avoid subtly breaking x86 when we are
merging files together?
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/hw_irq.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h index 77ba51df566..edd0b95f14d 100644 --- a/include/asm-x86/hw_irq.h +++ b/include/asm-x86/hw_irq.h @@ -98,9 +98,17 @@ extern void (*const interrupt[NR_IRQS])(void); #else typedef int vector_irq_t[NR_VECTORS]; DECLARE_PER_CPU(vector_irq_t, vector_irq); -extern spinlock_t vector_lock; #endif -extern void setup_vector_irq(int cpu); + +#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64) +extern void lock_vector_lock(void); +extern void unlock_vector_lock(void); +extern void __setup_vector_irq(int cpu); +#else +static inline void lock_vector_lock(void) {} +static inline void unlock_vector_lock(void) {} +static inline void __setup_vector_irq(int cpu) {} +#endif #endif /* !ASSEMBLY_ */ |