]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/syscall: Save r3 in regs->orig_r3
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 8 Feb 2021 15:10:30 +0000 (15:10 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:35:10 +0000 (23:35 +1100)
Save r3 in regs->orig_r3 in system_call_exception()

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9a90805ab6b9101b46daf56470f457a57acd86fc.1612796617.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/interrupt.c

index 4b2d2823c7a5f094424caedaddcf4d1638a44b3a..14696faa72f88ff66b694770faed308e42e22d1e 100644 (file)
@@ -108,7 +108,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_TM)
        li      r11,\trapnr
        std     r11,_TRAP(r1)
        std     r12,_CCR(r1)
-       std     r3,ORIG_GPR3(r1)
        addi    r10,r1,STACK_FRAME_OVERHEAD
        ld      r11,exception_marker@toc(r2)
        std     r11,-16(r10)            /* "regshere" marker */
@@ -284,7 +283,6 @@ END_BTB_FLUSH_SECTION
        std     r10,_LINK(r1)
        std     r11,_TRAP(r1)
        std     r12,_CCR(r1)
-       std     r3,ORIG_GPR3(r1)
        addi    r10,r1,STACK_FRAME_OVERHEAD
        ld      r11,exception_marker@toc(r2)
        std     r11,-16(r10)            /* "regshere" marker */
index 46fd195ca659a74e89fbd46f95cf560ea1db9437..1a2dec49f81175449c5154ff8ee575bd2067b7ac 100644 (file)
@@ -29,6 +29,8 @@ notrace long system_call_exception(long r3, long r4, long r5,
 {
        syscall_fn f;
 
+       regs->orig_gpr3 = r3;
+
        if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
                BUG_ON(irq_soft_mask_return() != IRQS_ALL_DISABLED);