Skip to content

Commit 767e6e7

Browse files
chleroympe
authored andcommitted
powerpc/interrupt: Also use exit_must_hard_disable() on PPC32
Reduce #ifdefs a bit by making exit_must_hard_disable() return true on PPC32. Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/52531029563c1fc823b790058e799d0ca71b028c.1624631463.git.christophe.leroy@csgroup.eu
1 parent 590e1e4 commit 767e6e7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

arch/powerpc/kernel/interrupt.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ static inline bool exit_must_hard_disable(void)
3333
{
3434
return static_branch_unlikely(&interrupt_exit_not_reentrant);
3535
}
36-
#elif defined(CONFIG_PPC64)
36+
#else
3737
static inline bool exit_must_hard_disable(void)
3838
{
39-
return false;
39+
return IS_ENABLED(CONFIG_PPC32);
4040
}
4141
#endif
4242

@@ -56,12 +56,10 @@ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable)
5656
/* This must be done with RI=1 because tracing may touch vmaps */
5757
trace_hardirqs_on();
5858

59-
#ifdef CONFIG_PPC32
60-
__hard_EE_RI_disable();
61-
#else
6259
if (exit_must_hard_disable() || !restartable)
6360
__hard_EE_RI_disable();
6461

62+
#ifdef CONFIG_PPC64
6563
/* This pattern matches prep_irq_for_idle */
6664
if (unlikely(lazy_irq_pending_nocheck())) {
6765
if (exit_must_hard_disable() || !restartable) {

0 commit comments

Comments
 (0)