[PATCH v10 05/14] powerpc/irq: Cleanup hard_irq_disable() macro
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Mon Aug 21 03:58:22 AEST 2017
Minor cleanup to use helper function for manipulating
paca->soft_enabled variable.
Suggested-by: Nicholas Piggin <npiggin at gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
arch/powerpc/include/asm/hw_irq.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index f6064634d278..d1ddb74fe837 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -126,12 +126,11 @@ static inline bool arch_irqs_disabled(void)
#endif
#define hard_irq_disable() do { \
- u8 _was_enabled; \
+ unsigned long flags; \
__hard_irq_disable(); \
- _was_enabled = local_paca->soft_enabled; \
- local_paca->soft_enabled = IRQ_DISABLED;\
+ flags = soft_enabled_set_return(IRQ_DISABLED); \
local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \
- if (_was_enabled == IRQ_ENABLED) \
+ if (!arch_irqs_disabled_flags(flags)) \
trace_hardirqs_off(); \
} while(0)
--
2.7.4
More information about the Linuxppc-dev
mailing list