diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-06-25 17:31:46 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-06-26 02:43:34 +0300 |
commit | 767e6e7130b288d856e4f2be365554dc6147a80a (patch) | |
tree | 76f3dde3e012b56f539c19d39effed224e87f496 /arch/powerpc | |
parent | 590e1e4254458455477e4e857cd00733280a3d73 (diff) | |
download | linux-767e6e7130b288d856e4f2be365554dc6147a80a.tar.xz |
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 <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/52531029563c1fc823b790058e799d0ca71b028c.1624631463.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/interrupt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index cee12f2fd459..1b4a99ecb7e5 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -33,10 +33,10 @@ static inline bool exit_must_hard_disable(void) { return static_branch_unlikely(&interrupt_exit_not_reentrant); } -#elif defined(CONFIG_PPC64) +#else static inline bool exit_must_hard_disable(void) { - return false; + return IS_ENABLED(CONFIG_PPC32); } #endif @@ -56,12 +56,10 @@ static notrace __always_inline bool prep_irq_for_enabled_exit(bool restartable) /* This must be done with RI=1 because tracing may touch vmaps */ trace_hardirqs_on(); -#ifdef CONFIG_PPC32 - __hard_EE_RI_disable(); -#else if (exit_must_hard_disable() || !restartable) __hard_EE_RI_disable(); +#ifdef CONFIG_PPC64 /* This pattern matches prep_irq_for_idle */ if (unlikely(lazy_irq_pending_nocheck())) { if (exit_must_hard_disable() || !restartable) { |