Skip to content

Commit 29dbb98

Browse files
committed
powerpc/64s: Remove the "fast endian switch" syscall
The non-standard "fast endian switch" syscall was added in 2008[1], but was never widely used. It was disabled by default in 2017[2], and there's no evidence it's ever been used since. Remove it entirely. A normal endian switch syscall was added in 2015[3]. [1]: 745a14c ("[POWERPC] Add fast little-endian switch system call") [2]: 529d235 ("powerpc: Add a proper syscall for switching endianness") [3]: 727f136 ("powerpc: Disable the fast-endian switch syscall by default") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240823070830.1269033-1-mpe@ellerman.id.au
1 parent 87def77 commit 29dbb98

2 files changed

Lines changed: 0 additions & 23 deletions

File tree

arch/powerpc/Kconfig.debug

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,6 @@ config FAIL_IOMMU
379379

380380
If you are unsure, say N.
381381

382-
config PPC_FAST_ENDIAN_SWITCH
383-
bool "Deprecated fast endian-switch syscall"
384-
depends on DEBUG_KERNEL && PPC_BOOK3S_64
385-
help
386-
If you're unsure what this is, say N.
387-
388382
config KASAN_SHADOW_OFFSET
389383
hex
390384
depends on KASAN

arch/powerpc/kernel/exceptions-64s.S

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,13 +1989,6 @@ INT_DEFINE_END(system_call)
19891989
INTERRUPT_TO_KERNEL
19901990
#endif
19911991

1992-
#ifdef CONFIG_PPC_FAST_ENDIAN_SWITCH
1993-
BEGIN_FTR_SECTION
1994-
cmpdi r0,0x1ebe
1995-
beq- 1f
1996-
END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
1997-
#endif
1998-
19991992
/* We reach here with PACA in r13, r13 in r9. */
20001993
mfspr r11,SPRN_SRR0
20011994
mfspr r12,SPRN_SRR1
@@ -2015,16 +2008,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
20152008
b system_call_common
20162009
#endif
20172010
.endif
2018-
2019-
#ifdef CONFIG_PPC_FAST_ENDIAN_SWITCH
2020-
/* Fast LE/BE switch system call */
2021-
1: mfspr r12,SPRN_SRR1
2022-
xori r12,r12,MSR_LE
2023-
mtspr SPRN_SRR1,r12
2024-
mr r13,r9
2025-
RFI_TO_USER /* return to userspace */
2026-
b . /* prevent speculative execution */
2027-
#endif
20282011
.endm
20292012

20302013
EXC_REAL_BEGIN(system_call, 0xc00, 0x100)

0 commit comments

Comments
 (0)