linux/arch/powerpc/kernel/ptrace
Nicholas Piggin 59dc5bfca0 powerpc/64s: avoid reloading (H)SRR registers if they are still valid
When an interrupt is taken, the SRR registers are set to return to where
it left off. Unless they are modified in the meantime, or the return
address or MSR are modified, there is no need to reload these registers
when returning from interrupt.

Introduce per-CPU flags that track the validity of SRR and HSRR
registers. These are cleared when returning from interrupt, when
using the registers for something else (e.g., OPAL calls), when
adjusting the return address or MSR of a context, and when context
switching (which changes the return address and MSR).

This improves the performance of interrupt returns.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Fold in fixup patch from Nick]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210617155116.2167984-5-npiggin@gmail.com
2021-06-25 00:06:55 +10:00
..
Makefile powerpc/ptrace: Don't return error when getting/setting FP regs without CONFIG_PPC_FPU_REGS 2021-04-02 00:15:37 +11:00
ptrace32.c powerpc: remove partial register save logic 2021-04-14 23:04:44 +10:00
ptrace-adv.c powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
ptrace-altivec.c powerpc: switch to ->regset_get() 2020-07-27 14:31:07 -04:00
ptrace-decl.h powerpc/ptrace: Don't return error when getting/setting FP regs without CONFIG_PPC_FPU_REGS 2021-04-02 00:15:37 +11:00
ptrace-fpu.c powerpc/ptrace: Don't return error when getting/setting FP regs without CONFIG_PPC_FPU_REGS 2021-04-02 00:15:37 +11:00
ptrace-noadv.c powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
ptrace-novsx.c powerpc/ptrace: Don't return error when getting/setting FP regs without CONFIG_PPC_FPU_REGS 2021-04-02 00:15:37 +11:00
ptrace-spe.c powerpc: switch to ->regset_get() 2020-07-27 14:31:07 -04:00
ptrace-tm.c powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too 2020-11-26 22:05:42 +11:00
ptrace-view.c powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
ptrace-vsx.c powerpc: switch to ->regset_get() 2020-07-27 14:31:07 -04:00
ptrace.c powerpc: remove partial register save logic 2021-04-14 23:04:44 +10:00