powerpc: Use user_mode() macro when possible
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 16 Feb 2024 10:10:36 +0000 (11:10 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Feb 2024 10:55:33 +0000 (21:55 +1100)
commitd5835fb60bad641dbae64fe30c02f10857bf4647
tree833480077dbbc7ce3f42ccbde962dbe071703ce1
parent9e00743aba832f3f30ecb017d3345baf1f372140
powerpc: Use user_mode() macro when possible

There is a nice macro to check user mode.

Use it instead of open coding anding with MSR_PR to increase
readability and avoid having to comment what that anding is for.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/fbf74887dcf1f1ba9e1680fc3247cbb581b00662.1708078228.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/interrupt.h
arch/powerpc/kernel/syscall.c
arch/powerpc/kernel/traps.c
arch/powerpc/lib/sstep.c
arch/powerpc/perf/core-book3s.c
arch/powerpc/xmon/xmon.c