Skip to content

Commit a2b3e09

Browse files
chleroympe
authored andcommitted
powerpc/32: Only use prepare_transfer_to_handler function on book3s/32 and e500
Only book3s/32 and e500 have significative work to do in prepare_transfer_to_handler. Other 32 bit have nothing to do at all. Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/b5e29ca0e557c11340415a13fe8b107189d315e1.1615552867.git.christophe.leroy@csgroup.eu
1 parent a5d33be commit a2b3e09

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

arch/powerpc/kernel/entry_32.S

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
*/
4949
.align 12
5050

51+
#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
5152
.globl prepare_transfer_to_handler
5253
prepare_transfer_to_handler:
5354
andi. r12,r9,MSR_PR
@@ -61,15 +62,12 @@ prepare_transfer_to_handler:
6162
/* if from kernel, check interrupted DOZE/NAP mode */
6263
2:
6364
kuap_save_and_lock r11, r12, r9, r5, r6
64-
#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
6565
lwz r12,TI_LOCAL_FLAGS(r2)
6666
mtcrf 0x01,r12
6767
bt- 31-TLF_NAPPING,4f
6868
bt- 31-TLF_SLEEPING,7f
69-
#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */
7069
blr
7170

72-
#if defined (CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
7371
4: rlwinm r12,r12,0,~_TLF_NAPPING
7472
stw r12,TI_LOCAL_FLAGS(r2)
7573
b power_save_ppc32_restore
@@ -82,8 +80,8 @@ prepare_transfer_to_handler:
8280
kuap_restore r11, r2, r3, r4, r5
8381
lwz r2, GPR2(r11)
8482
b fast_exception_return
85-
#endif
8683
_ASM_NOKPROBE_SYMBOL(prepare_transfer_to_handler)
84+
#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */
8785

8886
.globl transfer_to_syscall
8987
transfer_to_syscall:

arch/powerpc/kernel/head_32.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ _ASM_NOKPROBE_SYMBOL(\name\()_virt)
132132
.endm
133133

134134
.macro prepare_transfer_to_handler
135+
#ifdef CONFIG_PPC_BOOK3S_32
135136
bl prepare_transfer_to_handler
137+
#endif
136138
.endm
137139

138140
.macro SYSCALL_ENTRY trapno

arch/powerpc/kernel/head_booke.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ END_BTB_FLUSH_SECTION
104104
.endm
105105

106106
.macro prepare_transfer_to_handler
107+
#ifdef CONFIG_E500
107108
bl prepare_transfer_to_handler
109+
#endif
108110
.endm
109111

110112
.macro SYSCALL_ENTRY trapno intno srr1

0 commit comments

Comments
 (0)