mbox series

[0/6] powerpc/64: Build with PC-Relative addressing

Message ID 20230408021752.862660-1-npiggin@gmail.com (mailing list archive)
Headers show
Series powerpc/64: Build with PC-Relative addressing | expand

Message

Nicholas Piggin April 8, 2023, 2:17 a.m. UTC
This won't see a lot of real use until POWER10 is the oldest supported
CPU for distros, but being as we're quite a unique user of toolchain I'd
like to start ironing things out earlier rather than later. I'm making a
list of observations here, https://github.com/linuxppc/issues/issues/455
and will take them to toolchan developers after the kernel work is a bit
further along.

The series is working pretty well for me on pseries and powernv systems.
Since RFC I've tidied things a bit and fixed the remaining hacks and
known issues, mainly in the module loader.

The first two patches are already posted to the list, boot code changes
that aren't too interesting to toolchain.

Thanks,
Nick

Nicholas Piggin (6):
  powerpc/64: Move initial base and TOC pointer calculation
  powerpc/64s: Run at the kernel virtual address earlier in boot
  powerpc/64: Add support to build with prefixed instructions
  powerpc: add CFUNC assembly label annotation
  powerpc/64: vmlinux support building with PCREL addresing
  powerpc/64: modules support building with PCREL addresing

 arch/powerpc/Kconfig                    |   6 +
 arch/powerpc/Makefile                   |  10 +
 arch/powerpc/include/asm/atomic.h       |  24 +-
 arch/powerpc/include/asm/io.h           |  37 +++
 arch/powerpc/include/asm/module.h       |  10 +-
 arch/powerpc/include/asm/paca.h         |   2 +
 arch/powerpc/include/asm/ppc-opcode.h   |   8 +
 arch/powerpc/include/asm/ppc_asm.h      |  24 ++
 arch/powerpc/include/asm/sections.h     |   5 +
 arch/powerpc/include/asm/uaccess.h      |  28 +-
 arch/powerpc/include/uapi/asm/elf.h     |   4 +
 arch/powerpc/kernel/asm-offsets.c       |   2 +
 arch/powerpc/kernel/exceptions-64s.S    | 112 +++----
 arch/powerpc/kernel/head_64.S           | 130 ++++----
 arch/powerpc/kernel/interrupt_64.S      |  28 +-
 arch/powerpc/kernel/irq.c               |   8 +
 arch/powerpc/kernel/misc_64.S           |   2 +-
 arch/powerpc/kernel/module_64.c         | 376 +++++++++++++++++++++---
 arch/powerpc/kernel/paca.c              |   2 +
 arch/powerpc/kernel/trace/ftrace.c      |  52 +++-
 arch/powerpc/kernel/vdso/gettimeofday.S |   6 +-
 arch/powerpc/kernel/vector.S            |   6 +
 arch/powerpc/kernel/vmlinux.lds.S       |   6 +
 arch/powerpc/kvm/book3s_hv_rmhandlers.S |  16 +-
 arch/powerpc/lib/copypage_64.S          |  10 +
 arch/powerpc/lib/copypage_power7.S      |   4 +-
 arch/powerpc/lib/copyuser_power7.S      |   8 +-
 arch/powerpc/lib/hweight_64.S           |   8 +-
 arch/powerpc/lib/memcmp_64.S            |   4 +-
 arch/powerpc/lib/memcpy_power7.S        |   6 +-
 arch/powerpc/net/bpf_jit.h              |  10 +-
 arch/powerpc/net/bpf_jit_comp64.c       |  35 ++-
 arch/powerpc/platforms/Kconfig.cputype  |  38 +++
 arch/powerpc/platforms/pseries/hvCall.S |   4 +-
 arch/powerpc/xmon/xmon.c                |   2 +
 35 files changed, 814 insertions(+), 219 deletions(-)

Comments

Michael Ellerman April 26, 2023, 12:01 p.m. UTC | #1
On Sat, 08 Apr 2023 12:17:46 +1000, Nicholas Piggin wrote:
> This won't see a lot of real use until POWER10 is the oldest supported
> CPU for distros, but being as we're quite a unique user of toolchain I'd
> like to start ironing things out earlier rather than later. I'm making a
> list of observations here, https://github.com/linuxppc/issues/issues/455
> and will take them to toolchan developers after the kernel work is a bit
> further along.
> 
> [...]

Applied to powerpc/next.

[1/6] powerpc/64: Move initial base and TOC pointer calculation
      https://git.kernel.org/powerpc/c/4f18b9e6ca58440394e86a53bf1be0d8a1920bcd
[2/6] powerpc/64s: Run at the kernel virtual address earlier in boot
      https://git.kernel.org/powerpc/c/b270bebd34e36fb69363d65e24b00a9d148903e8
[3/6] powerpc/64: Add support to build with prefixed instructions
      https://git.kernel.org/powerpc/c/dc5dac748af9087e9240bd2ae6ae7db48d5360ae
[4/6] powerpc: add CFUNC assembly label annotation
      https://git.kernel.org/powerpc/c/4e991e3c16a350d1eeffc100ce3fb25292596d03
[5/6] powerpc/64: vmlinux support building with PCREL addresing
      https://git.kernel.org/powerpc/c/7e3a68be42e10f5fa5890e97afc0afd992355bc3
[6/6] powerpc/64: modules support building with PCREL addresing
      https://git.kernel.org/powerpc/c/77e69ee7ce0715c39b9a0cde68ff44fe467435ef

cheers