aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/ppc_asm.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2020-06-11 18:12:03 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-22 23:00:27 +1000
commit7fa95f9adaee7e5cbb195d3359741120829e488b (patch)
tree1ca2d65102ad2c5223afe9a78e3105836982479f /arch/powerpc/include/asm/ppc_asm.h
parentpowerpc/64s/exception: treat NIA below __end_interrupts as soft-masked (diff)
downloadlinux-dev-7fa95f9adaee7e5cbb195d3359741120829e488b.tar.xz
linux-dev-7fa95f9adaee7e5cbb195d3359741120829e488b.zip
powerpc/64s: system call support for scv/rfscv instructions
Add support for the scv instruction on POWER9 and later CPUs. For now this implements the zeroth scv vector 'scv 0', as identical to 'sc' system calls, with the exception that LR is not preserved, nor are volatile CR registers, and error is not indicated with CR0[SO], but by returning a negative errno. rfscv is implemented to return from scv type system calls. It can not be used to return from sc system calls because those are defined to preserve LR. getpid syscall throughput on POWER9 is improved by 26% (428 to 318 cycles), largely due to reducing mtmsr and mtspr. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [mpe: Fix ppc64e build] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200611081203.995112-3-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/include/asm/ppc_asm.h')
-rw-r--r--arch/powerpc/include/asm/ppc_asm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 6b03dff61a05..160f3bb77ea4 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -755,6 +755,8 @@ END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96)
#define N_SLINE 68
#define N_SO 100
+#define RFSCV .long 0x4c0000a4
+
/*
* Create an endian fixup trampoline
*