diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2008-08-09 18:09:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 04:37:34 -0400 |
commit | d388e5fdc461344d04307a3fa83862b9ed429647 (patch) | |
tree | 61a9a4311b165038423a0f3412e93b8811796c6b /include | |
parent | 31343d8a5079cda57ffd539fcf4f00cea344fe98 (diff) |
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')
-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 77ba51df5668..edd0b95f14d0 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); | |||
98 | #else | 98 | #else |
99 | typedef int vector_irq_t[NR_VECTORS]; | 99 | typedef int vector_irq_t[NR_VECTORS]; |
100 | DECLARE_PER_CPU(vector_irq_t, vector_irq); | 100 | DECLARE_PER_CPU(vector_irq_t, vector_irq); |
101 | extern spinlock_t vector_lock; | ||
102 | #endif | 101 | #endif |
103 | extern void setup_vector_irq(int cpu); | 102 | |
103 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64) | ||
104 | extern void lock_vector_lock(void); | ||
105 | extern void unlock_vector_lock(void); | ||
106 | extern void __setup_vector_irq(int cpu); | ||
107 | #else | ||
108 | static inline void lock_vector_lock(void) {} | ||
109 | static inline void unlock_vector_lock(void) {} | ||
110 | static inline void __setup_vector_irq(int cpu) {} | ||
111 | #endif | ||
104 | 112 | ||
105 | #endif /* !ASSEMBLY_ */ | 113 | #endif /* !ASSEMBLY_ */ |
106 | 114 | ||