]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc/interrupt: Use names in check_return_regs_valid()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 25 Jun 2021 14:49:09 +0000 (14:49 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 26 Jun 2021 00:59:21 +0000 (10:59 +1000)
trap->regs == 0x3000 is trap_is_scv()

trap 0x500 is INTERRUPT_EXTERNAL

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/d48bf0184a1de185eb0ed3282247f8a294710674.1624632537.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/interrupt.c

index 1b4a99ecb7e5669cb1de43b819f1fa46d808bb07..0052702ee5ac262a8e3afbf9769130c211ef0720 100644 (file)
@@ -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) {