Skip to content

RFC powerpc/64: Build with PC-Relative addressing

Nicholas Piggin linuxppc-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9crypto: powerpc - Use address generation helper for asmarch/powerpc/crypto/crc32-vpmsum_core.S+4 -90 replies
2/9powerpc/64s: Refactor initialisation after promarch/powerpc/kernel/head_64.S+25 -190 replies
3/9powerpc/64e: Simplify address calculation in secondary hold looparch/powerpc/kernel/head_64.S+1 -50 replies
4/9powerpc/64: Move initial base and TOC pointer calculationarch/powerpc/kernel/head_64.S+19 -90 replies
5/9powerpc/64s: Run at the kernel virtual address earlier in bootarch/powerpc/kernel/head_64.S+45 -380 replies
6/9powerpc: add CFUNC assembly label annotationarch/powerpc/include/asm/ppc_asm.h arch/powerpc/kernel/exceptions-64s.S arch/powerpc/kernel/head_64.S +10 more+112 -1030 replies
7/9powerpc/64: Add support to build with prefixed instructionsarch/powerpc/Kconfig arch/powerpc/Makefile arch/powerpc/include/asm/atomic.h +4 more+112 -60 replies
8/9powerpc/64: vmlinux support building with PCREL addresingarch/powerpc/Kconfig arch/powerpc/Makefile arch/powerpc/include/asm/paca.h +16 more+221 -400 replies
9/9powerpc/64: modules support building with PCREL addresingarch/powerpc/Makefile arch/powerpc/include/asm/module.h arch/powerpc/include/asm/ppc_asm.h +2 more+269 -490 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/9] powerpc/64: Build with PC-Relative addressing

This is a more complete change than my earlier hack. Namely fixed the boot code so it's more unified rather than adding a special case for Book3S+PCREL. Lots of bug fixes, and adding some of the ftrace and BPF trampoline/stubs. And added module support, which might be the most interesting bit.

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.

Thanks,
Nick

Nicholas Piggin (9):
crypto: powerpc - Use address generation helper for asm powerpc/64s: Refactor initialisation after prom powerpc/64e: Simplify address calculation in secondary hold loop powerpc/64: Move initial base and TOC pointer calculation powerpc/64s: Run at the kernel virtual address earlier in boot
powerpc: add CFUNC assembly label annotation powerpc/64: Add support to build with prefixed instructions 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/crypto/crc32-vpmsum_core.S |  13 +-
 arch/powerpc/include/asm/atomic.h       |  24 +-
 arch/powerpc/include/asm/io.h           |  37 +++
 arch/powerpc/include/asm/module.h       |   9 +-
 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           | 179 +++++++-----
 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         | 344 ++++++++++++++++++++----
 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          |   4 +-
 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 +
 36 files changed, 793 insertions(+), 263 deletions(-)
Signature · 1 line
2.37.2