aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/sstep.c
diff options
context:
space:
mode:
authorGravatar Nicholas Piggin <npiggin@gmail.com> 2020-02-26 03:35:32 +1000
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2020-04-01 13:42:13 +1100
commit965dd3ad307671d06471da0e9a44f3a194167d26 (patch)
tree7848dc88f2d67c22549aef30ea97c4cb7b7588c5 /arch/powerpc/lib/sstep.c
parentpowerpc/64s/exception: Soft NMI interrupt should not use ret_from_except (diff)
downloadlinux-965dd3ad307671d06471da0e9a44f3a194167d26.tar.gz
linux-965dd3ad307671d06471da0e9a44f3a194167d26.tar.bz2
linux-965dd3ad307671d06471da0e9a44f3a194167d26.zip
powerpc/64/syscall: Remove non-volatile GPR save optimisation
powerpc has an optimisation where interrupts avoid saving the non-volatile (or callee saved) registers to the interrupt stack frame if they are not required. Two problems with this are that an interrupt does not always know whether it will need non-volatiles; and if it does need them, they can only be saved from the entry-scoped asm code (because we don't control what the C compiler does with these registers). system calls are the most difficult: some system calls always require all registers (e.g., fork, to copy regs into the child). Sometimes registers are only required under certain conditions (e.g., tracing, signal delivery). These cases require ugly logic in the call chains (e.g., ppc_fork), and require a lot of logic to be implemented in asm. So remove the optimisation for system calls, and always save NVGPRs on entry. Modern high performance CPUs are not so sensitive, because the stores are dense in cache and can be hidden by other expensive work in the syscall path -- the null syscall selftests benchmark on POWER9 is not slowed (124.40ns before and 123.64ns after, i.e., within the noise). Other interrupts retain the NVGPR optimisation for now. 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-24-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/lib/sstep.c')
0 files changed, 0 insertions, 0 deletions