Commit acb396d7 authored by Madhavan Srinivasan's avatar Madhavan Srinivasan Committed by Michael Ellerman

powerpc/64: Cleanup hard_irq_disable() macro

Minor cleanup to use helper function for manipulating
paca->soft_enabled variable.
Suggested-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent a67c543a
...@@ -131,12 +131,11 @@ static inline bool arch_irqs_disabled(void) ...@@ -131,12 +131,11 @@ static inline bool arch_irqs_disabled(void)
#endif #endif
#define hard_irq_disable() do { \ #define hard_irq_disable() do { \
u8 _was_enabled; \ unsigned long flags; \
__hard_irq_disable(); \ __hard_irq_disable(); \
_was_enabled = local_paca->soft_enabled; \ flags = soft_enabled_set_return(IRQS_DISABLED); \
local_paca->soft_enabled = IRQS_DISABLED;\
local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \ local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \
if (_was_enabled == IRQS_ENABLED) \ if (!arch_irqs_disabled_flags(flags)) \
trace_hardirqs_off(); \ trace_hardirqs_off(); \
} while(0) } while(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment