linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Some improvements on regs usage
@ 2021-08-07  1:02 sxwjean
  2021-08-07  1:02 ` [PATCH v2 1/4] powerpc: Optimize register usage for esr register sxwjean
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: sxwjean @ 2021-08-07  1:02 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: oleg, mpe, benh, paulus, christophe.leroy, npiggin,
	ravi.bangoria, aneesh.kumar, efremov, linux-kernel,
	Xiongwei Song

From: Xiongwei Song <sxwjean@gmail.com>

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-27 13:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07  1:02 [PATCH v2 0/4] Some improvements on regs usage sxwjean
2021-08-07  1:02 ` [PATCH v2 1/4] powerpc: Optimize register usage for esr register sxwjean
2021-08-07  6:56   ` Christophe Leroy
2021-08-10  8:33     ` Xiongwei Song
2021-08-07  1:02 ` [PATCH v2 2/4] powerpc/64e: Get esr offset with _ESR macro sxwjean
2021-08-07  1:02 ` [PATCH v2 3/4] powerpc: Optimize register usage for dear register sxwjean
2021-08-07  6:57   ` Christophe Leroy
2021-08-10  8:33     ` Xiongwei Song
2021-08-07  1:02 ` [PATCH v2 4/4] powerpc/64e: Get dear offset with _DEAR macro sxwjean
2021-08-27 13:16 ` [PATCH v2 0/4] Some improvements on regs usage Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).