Skip to content

Commit b064037

Browse files
chleroympe
authored andcommitted
powerpc/interrupt: Use names in check_return_regs_valid()
trap->regs == 0x3000 is trap_is_scv() trap 0x500 is INTERRUPT_EXTERNAL Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/d48bf0184a1de185eb0ed3282247f8a294710674.1624632537.git.christophe.leroy@csgroup.eu
1 parent 767e6e7 commit b064037

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/kernel/interrupt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ static void check_return_regs_valid(struct pt_regs *regs)
222222
u8 *validp;
223223
char *h;
224224

225-
if (regs->trap == 0x3000)
225+
if (trap_is_scv(regs))
226226
return;
227227

228228
trap = regs->trap;
229229
// EE in HV mode sets HSRRs like 0xea0
230-
if (cpu_has_feature(CPU_FTR_HVMODE) && trap == 0x500)
230+
if (cpu_has_feature(CPU_FTR_HVMODE) && trap == INTERRUPT_EXTERNAL)
231231
trap = 0xea0;
232232

233233
switch (trap) {

0 commit comments

Comments
 (0)