Skip to content

Commit

Permalink
powerpc/32: Add a prepare_transfer_to_handler macro for exception pro…
Browse files Browse the repository at this point in the history
…logs

In order to increase flexibility, add a macro that will for now
call transfer_to_handler.

As transfer_to_handler doesn't do the actual transfer anymore,
also name it prepare_transfer_to_handler. The following patches
will progressively remove the use of transfer_to_handler label.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/7f757c52518ab1d7b27ad5113b10f860e803f467.1615552867.git.christophe.leroy@csgroup.eu
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Mar 29, 2021
1 parent 719e7e2 commit bce4c26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ _ASM_NOKPROBE_SYMBOL(transfer_to_handler_full)

.globl transfer_to_handler
transfer_to_handler:
.globl prepare_transfer_to_handler
prepare_transfer_to_handler:
SAVE_NVGPRS(r11)
addi r3,r1,STACK_FRAME_OVERHEAD
stw r2,GPR2(r11)
Expand Down Expand Up @@ -133,6 +135,7 @@ transfer_to_handler_cont:
lwz r2, GPR2(r11)
b fast_exception_return
#endif
_ASM_NOKPROBE_SYMBOL(prepare_transfer_to_handler)
_ASM_NOKPROBE_SYMBOL(transfer_to_handler)
_ASM_NOKPROBE_SYMBOL(transfer_to_handler_cont)

Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kernel/head_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
_ASM_NOKPROBE_SYMBOL(\name\()_virt)
.endm

.macro prepare_transfer_to_handler
bl prepare_transfer_to_handler
.endm

.macro SYSCALL_ENTRY trapno
mfspr r9, SPRN_SRR1
mfspr r10, SPRN_SRR0
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kernel/head_booke.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ END_BTB_FLUSH_SECTION
SAVE_4GPRS(3, r11); \
SAVE_2GPRS(7, r11)

.macro prepare_transfer_to_handler
bl prepare_transfer_to_handler
.endm

.macro SYSCALL_ENTRY trapno intno srr1
mfspr r10, SPRN_SPRG_THREAD
#ifdef CONFIG_KVM_BOOKE_HV
Expand Down

0 comments on commit bce4c26

Please sign in to comment.