Skip to content

Commit

Permalink
powerpc/64: Cleanup hard_irq_disable() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Madhavan Srinivasan authored and Michael Ellerman committed Jan 19, 2018
1 parent a67c543 commit acb396d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arch/powerpc/include/asm/hw_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit acb396d

Please sign in to comment.