powerpc/64s: Use {ZEROIZE,SAVE,REST}_GPRS macros in sc, scv 0 handlers
authorRohan McLure <rmclure@linux.ibm.com>
Wed, 21 Sep 2022 06:55:44 +0000 (16:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Sep 2022 13:00:15 +0000 (23:00 +1000)
commit2b1dac4b5f97ea88fb01dfcab7fc24500b5dea95
treeafd50f6f1c9106d554d2d3e11632f746af1bf8a3
parent9d54a5ce3aa87810f13cd33b314097ac6d28c350
powerpc/64s: Use {ZEROIZE,SAVE,REST}_GPRS macros in sc, scv 0 handlers

Use the convenience macros for saving/clearing/restoring gprs in keeping
with syscall calling conventions. The plural variants of these macros
can store a range of registers for concision.

This works well when the user gpr value we are hoping to save is still
live. In the syscall interrupt handlers, user register state is
sometimes juggled between registers. Hold-off from issuing the SAVE_GPR
macro for applicable neighbouring lines to highlight the delicate
register save logic.

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220921065605.1051927-5-rmclure@linux.ibm.com
arch/powerpc/kernel/interrupt_64.S