aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/sstep.c
diff options
context:
space:
mode:
authorGravatar Nicholas Piggin <npiggin@gmail.com> 2020-02-26 03:35:33 +1000
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2020-04-01 13:42:13 +1100
commitf14f8a2032af8c38440afa68ccd0586532ec61d5 (patch)
tree7de13439a79bfad94b2026461018cbf5ffe221aa /arch/powerpc/lib/sstep.c
parentpowerpc/64/syscall: Remove non-volatile GPR save optimisation (diff)
downloadlinux-f14f8a2032af8c38440afa68ccd0586532ec61d5.tar.gz
linux-f14f8a2032af8c38440afa68ccd0586532ec61d5.tar.bz2
linux-f14f8a2032af8c38440afa68ccd0586532ec61d5.zip
powerpc/64/sstep: Ifdef the deprecated fast endian switch syscall
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200225173541.1549955-25-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/lib/sstep.c')
-rw-r--r--arch/powerpc/lib/sstep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index c077acb983a1..5f3a7bd9d90d 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -3179,8 +3179,9 @@ int emulate_step(struct pt_regs *regs, unsigned int instr)
* entry code works. If that is changed, this will
* need to be changed also.
*/
- if (regs->gpr[0] == 0x1ebe &&
- cpu_has_feature(CPU_FTR_REAL_LE)) {
+ if (IS_ENABLED(CONFIG_PPC_FAST_ENDIAN_SWITCH) &&
+ cpu_has_feature(CPU_FTR_REAL_LE) &&
+ regs->gpr[0] == 0x1ebe) {
regs->msr ^= MSR_LE;
goto instr_done;
}