[PATCH] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1930d LANDED

Landed in mainline as 767e6e7130b2 on 2021-06-25.

2 messages, 2 authors, 2021-06-26 · open the first message on its own page

[PATCH] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32

From: Christophe Leroy <hidden>
Date: 2021-06-25 14:31:53

Reduce #ifdefs a bit by making exit_must_hard_disable() return
true on PPC32.

Signed-off-by: Christophe Leroy <redacted>
---
 arch/powerpc/kernel/interrupt.c | 8 +++-----
 1 file 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) {
-- 
2.25.0

Re: [PATCH] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32

From: Michael Ellerman <hidden>
Date: 2021-06-26 10:39:08

On Fri, 25 Jun 2021 14:31:46 +0000 (UTC), Christophe Leroy wrote:
Reduce #ifdefs a bit by making exit_must_hard_disable() return
true on PPC32.
Applied to powerpc/next.

[1/1] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32
      https://git.kernel.org/powerpc/c/767e6e7130b288d856e4f2be365554dc6147a80a

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help