powerpc/64: ret_from_fork avoid restoring regs twice
authorNicholas Piggin <npiggin@gmail.com>
Sat, 25 Mar 2023 12:29:00 +0000 (22:29 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 11 Apr 2023 13:13:32 +0000 (23:13 +1000)
If the system call return path always restores NVGPRs then there is no
need for ret_from_fork to do it. The HANDLER_RESTORE_NVGPRS does the
right thing for this.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230325122904.2375060-5-npiggin@gmail.com
arch/powerpc/kernel/interrupt_64.S

index d60e7e7564df10ef7e2518bd5807b3554f042f2a..bac1f89501acdfce3bcb6ff20fc3c08ea43a28d3 100644 (file)
@@ -728,14 +728,14 @@ DEFINE_FIXED_SYMBOL(__end_soft_masked, text)
 #ifdef CONFIG_PPC_BOOK3S
 _GLOBAL(ret_from_fork_scv)
        bl      schedule_tail
-       REST_NVGPRS(r1)
+       HANDLER_RESTORE_NVGPRS()
        li      r3,0    /* fork() return value */
        b       .Lsyscall_vectored_common_exit
 #endif
 
 _GLOBAL(ret_from_fork)
        bl      schedule_tail
-       REST_NVGPRS(r1)
+       HANDLER_RESTORE_NVGPRS()
        li      r3,0    /* fork() return value */
        b       .Lsyscall_exit