diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-02-08 15:10:33 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-02-11 23:35:11 +1100 |
commit | 6f76a01173ccaa363739f913394d4e138d92d718 (patch) | |
tree | 95a1a11050edc174079c6ac160adb1baa5674b98 /arch/powerpc/kernel/head_32.h | |
parent | fbcee2ebe8edbb6a93316f0a189ae7fcfaa7094f (diff) |
powerpc/syscall: implement system call entry/exit logic in C for PPC32
That's port of PPC64 syscall entry/exit logic in C to PPC32.
Performancewise on 8xx:
Before : 304 cycles on null_syscall
After : 348 cycles on null_syscall
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a93b08e1275e9d1f0b1c39043d1b827586b2b401.1612796617.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_32.h')
-rw-r--r-- | arch/powerpc/kernel/head_32.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index 573c1d570a6a..af4978e9d50d 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -154,17 +154,12 @@ SAVE_GPR(0, r11) SAVE_4GPRS(3, r11) SAVE_2GPRS(7, r11) - addi r11,r1,STACK_FRAME_OVERHEAD addi r2,r12,-THREAD - stw r11,PT_REGS(r12) #if defined(CONFIG_40x) /* Check to see if the dbcr0 register is set up to debug. Use the internal debug mode bit to do this. */ lwz r12,THREAD_DBCR0(r12) andis. r12,r12,DBCR0_IDM@h -#endif - ACCOUNT_CPU_USER_ENTRY(r2, r11, r12) -#if defined(CONFIG_40x) beq+ 3f /* From user and task is ptraced - load up global dbcr0 */ li r12,-1 /* clear all pending debug events */ @@ -176,21 +171,8 @@ lwz r12,4(r11) addi r12,r12,-1 stw r12,4(r11) -#endif - 3: -#ifdef CONFIG_TRACE_IRQFLAGS - /* - * If MSR is changing we need to keep interrupts disabled at this point - * otherwise we might risk taking an interrupt before we tell lockdep - * they are enabled. - */ - LOAD_REG_IMMEDIATE(r10, MSR_KERNEL) - rlwimi r10, r9, 0, MSR_EE -#else - LOAD_REG_IMMEDIATE(r10, MSR_KERNEL | MSR_EE) #endif - mtmsr r10 b transfer_to_syscall /* jump to handler */ 99: b ret_from_kernel_syscall .endm |