summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/head_booke.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-06-04 14:54:14 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-06-25 00:07:10 +1000
commit4bd9e05ac7b8b1f7d0c28702cb684417501a5e39 (patch)
tree0c0722fa29cbde6ea0c6361e1ed54ac5e56ac47a /arch/powerpc/kernel/head_booke.h
parent275dcf24e253f4f5b200bc8cca5eac32a23b08c8 (diff)
downloadlwn-4bd9e05ac7b8b1f7d0c28702cb684417501a5e39.tar.gz
lwn-4bd9e05ac7b8b1f7d0c28702cb684417501a5e39.zip
powerpc/32: Reduce code duplication of system call entry
booke and non booke do pretty similar things in SYSCALL_ENTRY macro just before calling jumping to transfer_to_syscall(). Do them in transfer_to_syscall() instead. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/552e27fa09394a6bc70585fcdfa237f99a5d1267.1622818435.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_booke.h')
-rw-r--r--arch/powerpc/kernel/head_booke.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index 4a2fad9f225e..10f31146b472 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -140,26 +140,8 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_EMB_HV)
rlwinm r12,r12,0,4,2 /* Clear SO bit in CR */
ALLOC_STACK_FRAME(r1, THREAD_SIZE - INT_FRAME_SIZE)
stw r12, _CCR(r1)
- mflr r12
- stw r12,_LINK(r1)
mfspr r12,SPRN_SRR0
- stw r11, GPR1(r1)
- stw r11, 0(r1)
- mr r11, r1
stw r12,_NIP(r1)
- rlwinm r9,r9,0,14,12 /* clear MSR_WE (necessary?) */
- lis r12, STACK_FRAME_REGS_MARKER@ha /* exception frame marker */
- stw r2,GPR2(r11)
- addi r12, r12, STACK_FRAME_REGS_MARKER@l
- stw r9,_MSR(r11)
- li r2, \trapno
- stw r12, 8(r11)
- stw r2,_TRAP(r11)
- SAVE_GPR(0, r11)
- SAVE_4GPRS(3, r11)
- SAVE_2GPRS(7, r11)
-
- addi r2,r10,-THREAD
b transfer_to_syscall /* jump to handler */
.endm