diff options
author | Tiejun Chen <tiejun.chen@windriver.com> | 2013-07-14 22:36:04 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-07-24 00:18:44 -0400 |
commit | 0b88f772bdf2847461debf417b1ee96043a7cb1b (patch) | |
tree | a2abb3bc097e52117ff5005e2f50a1a45eda0736 /arch/powerpc | |
parent | 0e0ed6406e61434d3f38fb58aa8464ec4722b77e (diff) |
powerpc: Access local paca after hard irq disabled
In hard_irq_disable(), we accessed the PACA before we hard disabled
the interrupts, potentially causing a warning as get_paca() will
us debug_smp_processor_id().
Move that to after the disabling, and also use local_paca directly
rather than get_paca() to avoid several redundant and useless checks.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/hw_irq.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index ba713f166fa5..10be1dd01c6b 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h | |||
@@ -96,10 +96,11 @@ static inline bool arch_irqs_disabled(void) | |||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | #define hard_irq_disable() do { \ | 98 | #define hard_irq_disable() do { \ |
99 | u8 _was_enabled = get_paca()->soft_enabled; \ | 99 | u8 _was_enabled; \ |
100 | __hard_irq_disable(); \ | 100 | __hard_irq_disable(); \ |
101 | get_paca()->soft_enabled = 0; \ | 101 | _was_enabled = local_paca->soft_enabled; \ |
102 | get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; \ | 102 | local_paca->soft_enabled = 0; \ |
103 | local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \ | ||
103 | if (_was_enabled) \ | 104 | if (_was_enabled) \ |
104 | trace_hardirqs_off(); \ | 105 | trace_hardirqs_off(); \ |
105 | } while(0) | 106 | } while(0) |