[PATCH] powerpc/interrupt: Use names in check_return_regs_valid()

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

STALE1929d LANDED

Landed in mainline as b064037ea410 on 2021-06-26.

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

[PATCH] powerpc/interrupt: Use names in check_return_regs_valid()

From: Christophe Leroy <hidden>
Date: 2021-06-25 14:49:18

trap->regs == 0x3000 is trap_is_scv()

trap 0x500 is INTERRUPT_EXTERNAL

Signed-off-by: Christophe Leroy <redacted>
---
 arch/powerpc/kernel/interrupt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index 1b4a99ecb7e5..0052702ee5ac 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -222,12 +222,12 @@ static void check_return_regs_valid(struct pt_regs *regs)
 	u8 *validp;
 	char *h;
 
-	if (regs->trap == 0x3000)
+	if (trap_is_scv(regs))
 		return;
 
 	trap = regs->trap;
 	// EE in HV mode sets HSRRs like 0xea0
-	if (cpu_has_feature(CPU_FTR_HVMODE) && trap == 0x500)
+	if (cpu_has_feature(CPU_FTR_HVMODE) && trap == INTERRUPT_EXTERNAL)
 		trap = 0xea0;
 
 	switch (trap) {
-- 
2.25.0

Re: [PATCH] powerpc/interrupt: Use names in check_return_regs_valid()

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

On Fri, 25 Jun 2021 14:49:09 +0000 (UTC), Christophe Leroy wrote:
trap->regs == 0x3000 is trap_is_scv()

trap 0x500 is INTERRUPT_EXTERNAL
Applied to powerpc/next.

[1/1] powerpc/interrupt: Use names in check_return_regs_valid()
      https://git.kernel.org/powerpc/c/b064037ea4104120418ccbf39951a6d529a9d6d5

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