summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>2017-12-20 04:55:48 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-19 12:37:00 +0100
commitacb396d7c2b8b5f0f567c980185bbddd10534b56 (patch)
treedb97d4d39926af56a57b1dd74834647139489e62 /arch
parentpowerpc/64: Implement and use soft_enabled_set_return API (diff)
downloadlinux-acb396d7c2b8b5f0f567c980185bbddd10534b56.tar.xz
linux-acb396d7c2b8b5f0f567c980185bbddd10534b56.zip
powerpc/64: Cleanup hard_irq_disable() macro
Minor cleanup to use helper function for manipulating paca->soft_enabled variable. Suggested-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/hw_irq.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
index c1764fabf181..52afb1595cb0 100644
--- a/arch/powerpc/include/asm/hw_irq.h
+++ b/arch/powerpc/include/asm/hw_irq.h
@@ -131,12 +131,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 = IRQS_DISABLED;\
+ flags = soft_enabled_set_return(IRQS_DISABLED); \
local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \
- if (_was_enabled == IRQS_ENABLED) \
+ if (!arch_irqs_disabled_flags(flags)) \
trace_hardirqs_off(); \
} while(0)