mbox series

[v2,0/5] powerpc/64: avoid GOT addressing, don't put data in TOC

Message ID 20220926034057.2360083-1-npiggin@gmail.com (mailing list archive)
Headers show
Series powerpc/64: avoid GOT addressing, don't put data in TOC | expand

Message

Nicholas Piggin Sept. 26, 2022, 3:40 a.m. UTC
This is a cleaned up set of the initial prep patches from the pcrel
series, dealing with regularising addressing variables from asm
and using helper macros more consistently.

Changes since v1:
- Use "REGS" stack frame marker for 64-bit, leaving 32-bit unchanged.
- Fix PPC64 32-bit boot wrapper compile.

Nicholas Piggin (5):
  powerpc/64: use 32-bit immediate for STACK_FRAME_REGS_MARKER
  powerpc/64: asm use consistent global variable declaration and access
  powerpc/64: switch asm helpers from GOT to TOC relative addressing
  powerpc/64: provide a helper macro to load r2 with the kernel TOC
  powerpc/64e: provide an addressing macro for use with TOC in alternate
    register

 arch/powerpc/boot/opal-calls.S                |  6 ++--
 arch/powerpc/boot/ppc_asm.h                   | 10 ++++++
 arch/powerpc/include/asm/ppc_asm.h            | 20 ++++++++++-
 arch/powerpc/include/asm/ptrace.h             |  4 +--
 arch/powerpc/kernel/entry_32.S                |  6 ++--
 arch/powerpc/kernel/exceptions-64e.S          | 34 ++++++++-----------
 arch/powerpc/kernel/exceptions-64s.S          |  8 ++---
 arch/powerpc/kernel/head_64.S                 | 11 ++----
 arch/powerpc/kernel/interrupt_64.S            | 28 +++++----------
 arch/powerpc/kernel/optprobes_head.S          |  2 +-
 arch/powerpc/kernel/swsusp_asm64.S            | 16 +++------
 arch/powerpc/kernel/trace/ftrace_low.S        |  2 +-
 arch/powerpc/kernel/trace/ftrace_mprofile.S   |  6 ++--
 arch/powerpc/kernel/vector.S                  | 15 ++++----
 arch/powerpc/kvm/book3s_64_entry.S            |  2 +-
 arch/powerpc/kvm/book3s_hv_rmhandlers.S       |  4 +--
 arch/powerpc/kvm/tm.S                         |  2 +-
 arch/powerpc/lib/copypage_64.S                |  7 +---
 arch/powerpc/lib/string_64.S                  |  7 +---
 arch/powerpc/mm/nohash/tlb_low_64e.S          |  4 +--
 arch/powerpc/perf/bhrb.S                      |  2 +-
 .../powerpc/platforms/powernv/opal-wrappers.S |  2 +-
 arch/powerpc/platforms/pseries/hvCall.S       |  4 +--
 arch/powerpc/xmon/spr_access.S                |  4 +--
 24 files changed, 96 insertions(+), 110 deletions(-)

Comments

Michael Ellerman Oct. 4, 2022, 1:25 p.m. UTC | #1
On Mon, 26 Sep 2022 13:40:52 +1000, Nicholas Piggin wrote:
> This is a cleaned up set of the initial prep patches from the pcrel
> series, dealing with regularising addressing variables from asm
> and using helper macros more consistently.
> 
> Changes since v1:
> - Use "REGS" stack frame marker for 64-bit, leaving 32-bit unchanged.
> - Fix PPC64 32-bit boot wrapper compile.
> 
> [...]

Applied to powerpc/next.

[1/5] powerpc/64: use 32-bit immediate for STACK_FRAME_REGS_MARKER
      https://git.kernel.org/powerpc/c/17773afdcd1589c5925a984f512330410cb2ba4f
[2/5] powerpc/64: asm use consistent global variable declaration and access
      https://git.kernel.org/powerpc/c/dab3b8f4fd09c22e8dbb2d9608194c7d52252f33
[3/5] powerpc/64: switch asm helpers from GOT to TOC relative addressing
      https://git.kernel.org/powerpc/c/754f611774e4b9357a944f5b703dd291c85161cf
[4/5] powerpc/64: provide a helper macro to load r2 with the kernel TOC
      https://git.kernel.org/powerpc/c/8e93fb33c84f68db20c0bc2821334a4c54c3e251
[5/5] powerpc/64e: provide an addressing macro for use with TOC in alternate register
      https://git.kernel.org/powerpc/c/3569d84bb26f6f07d426446da3d2c836180f1565

cheers