linux-stable/arch/powerpc/xmon
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
..
ansidecl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dis-asm.h powerpc/xmon: Fix compile error in print_insn* functions 2020-01-26 00:11:35 +11:00
Makefile kbuild: introduce ccflags-remove-y and asflags-remove-y 2020-08-10 01:32:59 +09:00
nonstdio.c powerpc/xmon: Change printk() to pr_cont() 2020-12-04 21:56:30 +11:00
nonstdio.h powerpc/xmon: Add __printf annotation to xmon_printf() 2018-05-25 12:04:36 +10:00
ppc-dis.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 76 2019-05-24 17:37:51 +02:00
ppc-opc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 76 2019-05-24 17:37:51 +02:00
ppc.h powerpc/xmon: Enable disassembly files (compilation changes) 2017-02-15 20:02:42 +11:00
spr_access.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
spu-dis.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
spu-insns.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
spu-opc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
spu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
xmon.c powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
xmon_bpts.h powerpc: Use a datatype for instructions 2020-05-19 00:10:37 +10:00
xmon_bpts.S powerpc: Add prefixed instructions to instruction data type 2020-05-19 00:10:39 +10:00