]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9fac71906b0a85851ec28c541cfbb81dc11a10cc
treeafd50f6f1c9106d554d2d3e11632f746af1bf8a3
parent0f4348c70fd90c184baf7b93f07064f525766f59
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