diff options
author | Ravikiran G Thirumalai <kiran@scalex86.org> | 2008-04-04 06:06:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-04 12:36:46 -0400 |
commit | bae1d2507e44417455eda76d4435352fee14cf51 (patch) | |
tree | 74ea2353ff103bd132a7a85c33785ce8855b0e4b | |
parent | 9c9b81f77330ddc003a2de2f35fa6a20410c1a62 (diff) |
x86: fix breakage of vSMP irq operations
25-rc* stopped working with CONFIG_X86_VSMP on vSMP machines.
Looks like the vsmp irq ops got accidentally removed during merge of x86_64
pvops in 2.6.25. -- commit 6abcd98ffafbff81f0bfd7ee1d129e634af13245 removed
vsmp irq ops.
Tested with both CONFIG_X86_VSMP and without CONFIG_X86_VSMP, on vSMP and non
vSMP x86_64 machines.
Please apply.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/asm-x86/irqflags.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/asm-x86/irqflags.h b/include/asm-x86/irqflags.h index 92021c1ffa3a..0e2292483b35 100644 --- a/include/asm-x86/irqflags.h +++ b/include/asm-x86/irqflags.h | |||
@@ -70,6 +70,26 @@ static inline void raw_local_irq_restore(unsigned long flags) | |||
70 | native_restore_fl(flags); | 70 | native_restore_fl(flags); |
71 | } | 71 | } |
72 | 72 | ||
73 | #ifdef CONFIG_X86_VSMP | ||
74 | |||
75 | /* | ||
76 | * Interrupt control for the VSMP architecture: | ||
77 | */ | ||
78 | |||
79 | static inline void raw_local_irq_disable(void) | ||
80 | { | ||
81 | unsigned long flags = __raw_local_save_flags(); | ||
82 | raw_local_irq_restore((flags & ~X86_EFLAGS_IF) | X86_EFLAGS_AC); | ||
83 | } | ||
84 | |||
85 | static inline void raw_local_irq_enable(void) | ||
86 | { | ||
87 | unsigned long flags = __raw_local_save_flags(); | ||
88 | raw_local_irq_restore((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); | ||
89 | } | ||
90 | |||
91 | #else | ||
92 | |||
73 | static inline void raw_local_irq_disable(void) | 93 | static inline void raw_local_irq_disable(void) |
74 | { | 94 | { |
75 | native_irq_disable(); | 95 | native_irq_disable(); |
@@ -80,6 +100,8 @@ static inline void raw_local_irq_enable(void) | |||
80 | native_irq_enable(); | 100 | native_irq_enable(); |
81 | } | 101 | } |
82 | 102 | ||
103 | #endif | ||
104 | |||
83 | /* | 105 | /* |
84 | * Used in the idle loop; sti takes one instruction cycle | 106 | * Used in the idle loop; sti takes one instruction cycle |
85 | * to complete: | 107 | * to complete: |
@@ -137,10 +159,17 @@ static inline unsigned long __raw_local_irq_save(void) | |||
137 | #define raw_local_irq_save(flags) \ | 159 | #define raw_local_irq_save(flags) \ |
138 | do { (flags) = __raw_local_irq_save(); } while (0) | 160 | do { (flags) = __raw_local_irq_save(); } while (0) |
139 | 161 | ||
162 | #ifdef CONFIG_X86_VSMP | ||
163 | static inline int raw_irqs_disabled_flags(unsigned long flags) | ||
164 | { | ||
165 | return !(flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC); | ||
166 | } | ||
167 | #else | ||
140 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 168 | static inline int raw_irqs_disabled_flags(unsigned long flags) |
141 | { | 169 | { |
142 | return !(flags & X86_EFLAGS_IF); | 170 | return !(flags & X86_EFLAGS_IF); |
143 | } | 171 | } |
172 | #endif | ||
144 | 173 | ||
145 | static inline int raw_irqs_disabled(void) | 174 | static inline int raw_irqs_disabled(void) |
146 | { | 175 | { |