diff options
Diffstat (limited to 'include/asm-powerpc/hw_irq.h')
-rw-r--r-- | include/asm-powerpc/hw_irq.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h index c4a1ab608f6f..fd3f2a206271 100644 --- a/include/asm-powerpc/hw_irq.h +++ b/include/asm-powerpc/hw_irq.h | |||
@@ -18,15 +18,25 @@ extern void timer_interrupt(struct pt_regs *); | |||
18 | 18 | ||
19 | static inline unsigned long local_get_flags(void) | 19 | static inline unsigned long local_get_flags(void) |
20 | { | 20 | { |
21 | return get_paca()->soft_enabled; | 21 | unsigned long flags; |
22 | |||
23 | __asm__ __volatile__("lbz %0,%1(13)" | ||
24 | : "=r" (flags) | ||
25 | : "i" (offsetof(struct paca_struct, soft_enabled))); | ||
26 | |||
27 | return flags; | ||
22 | } | 28 | } |
23 | 29 | ||
24 | static inline unsigned long local_irq_disable(void) | 30 | static inline unsigned long local_irq_disable(void) |
25 | { | 31 | { |
26 | unsigned long flag = get_paca()->soft_enabled; | 32 | unsigned long flags, zero; |
27 | get_paca()->soft_enabled = 0; | 33 | |
28 | barrier(); | 34 | __asm__ __volatile__("li %1,0; lbz %0,%2(13); stb %1,%2(13)" |
29 | return flag; | 35 | : "=r" (flags), "=&r" (zero) |
36 | : "i" (offsetof(struct paca_struct, soft_enabled)) | ||
37 | : "memory"); | ||
38 | |||
39 | return flags; | ||
30 | } | 40 | } |
31 | 41 | ||
32 | extern void local_irq_restore(unsigned long); | 42 | extern void local_irq_restore(unsigned long); |