[PATCH v2 0/4] Some improvements on regs usage

From: sxwjean
Date: Fri Aug 06 2021 - 21:03:25 EST


From: Xiongwei Song <sxwjean@xxxxxxxxx>

When CONFIG_4xx=y or CONFIG_BOOKE=y, currently in code we reference dsisr
to get interrupt reasons and reference dar to get excepiton address.
However, in reference manuals, esr is used for interrupt reasons and dear
is used for excepiton address, so the patchset changes dsisr -> esr,
dar -> dear for CONFIG_4xx=y or CONFIG_BOOKE=y.

Meanwhile, we use _ESR and _DEAR to get offsets of esr and dear on stack.

v2:
- Discard changes in arch/powerpc/mm/fault.c as Christophe and Michael
suggested.
- Discard changes in UAPI headers to avoid possible compile issue.

v1:
- https://lkml.org/lkml/2021/8/6/57
- https://lkml.org/lkml/2021/7/26/533
- https://lkml.org/lkml/2021/7/26/534
- https://lkml.org/lkml/2021/7/26/535

Xiongwei Song (4):
powerpc: Optimize register usage for esr register
powerpc/64e: Get esr offset with _ESR macro
powerpc: Optimize register usage for dear register
powerpc/64e: Get dear offset with _DEAR macro

arch/powerpc/include/asm/ptrace.h | 10 ++++++++--
arch/powerpc/kernel/asm-offsets.c | 15 ++++-----------
arch/powerpc/kernel/exceptions-64e.S | 18 +++++++++---------
arch/powerpc/kernel/process.c | 2 +-
arch/powerpc/kernel/ptrace/ptrace.c | 4 ++++
arch/powerpc/kernel/traps.c | 2 +-
arch/powerpc/platforms/44x/machine_check.c | 4 ++--
arch/powerpc/platforms/4xx/machine_check.c | 2 +-
8 files changed, 30 insertions(+), 27 deletions(-)

--
2.30.2