[RFC PATCH 0/7] powerpc: first hack at pcrel addressing

Nicholas Piggin npiggin at gmail.com
Tue Sep 20 00:01:42 AEST 2022


pcrel surprisingly didn't take much to get working, at least if
we ignore the hard bits (modules, ftrace, kprobes...). I'd like
to get it merged so we can incrementally fix the missing
bits. The series is functional but not quite polished, so this
is a good point to see if people agree with the approach.

Aside from polishing, the major bit missing before merge is Kconfig
detection of compiler pcrel feature.

Thanks,
Nick

Nicholas Piggin (7):
  powerpc: use 16-bit immediate for STACK_FRAME_REGS_MARKER
  powerpc/64: abstract asm global variable declaration and access
  powerpc/64: provide a helper macro to load r2 with the kernel TOC
  powerpc: add CFUNC assembly label annotation
  powerpc/64s: update generic cpu option name and compiler flags
  powerpc/64s: POWER10 CPU Kconfig build option
  powerpc/64s: Add option to build vmlinux with pcrel addressing

 arch/powerpc/Makefile                         |  22 ++-
 arch/powerpc/boot/opal-calls.S                |   6 +-
 arch/powerpc/boot/ppc_asm.h                   |   4 +
 arch/powerpc/include/asm/atomic.h             |  20 ++-
 arch/powerpc/include/asm/io.h                 |  36 ++++
 arch/powerpc/include/asm/ppc_asm.h            | 157 +++++++++++++++++-
 arch/powerpc/include/asm/ptrace.h             |   6 +-
 arch/powerpc/include/asm/uaccess.h            |  22 +++
 arch/powerpc/kernel/entry_32.S                |   9 +-
 arch/powerpc/kernel/exceptions-64e.S          |  12 +-
 arch/powerpc/kernel/exceptions-64s.S          | 116 ++++++-------
 arch/powerpc/kernel/head_32.h                 |   3 +-
 arch/powerpc/kernel/head_64.S                 |  58 +++++--
 arch/powerpc/kernel/head_booke.h              |   3 +-
 arch/powerpc/kernel/interrupt_64.S            |  56 +++----
 arch/powerpc/kernel/irq.c                     |   4 +
 arch/powerpc/kernel/misc_64.S                 |   2 +-
 arch/powerpc/kernel/optprobes_head.S          |   2 +-
 arch/powerpc/kernel/swsusp_asm64.S            |  22 +--
 arch/powerpc/kernel/trace/ftrace_mprofile.S   |   7 +-
 arch/powerpc/kernel/vdso/gettimeofday.S       |   2 +-
 arch/powerpc/kernel/vector.S                  |  41 ++---
 arch/powerpc/kernel/vmlinux.lds.S             |   6 +
 arch/powerpc/kvm/book3s_hv_rmhandlers.S       |  16 +-
 arch/powerpc/lib/copypage_64.S                |  11 +-
 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/lib/string_64.S                  |   9 +-
 arch/powerpc/perf/bhrb.S                      |   2 +-
 arch/powerpc/platforms/Kconfig.cputype        |  30 +++-
 .../powerpc/platforms/powernv/opal-wrappers.S |   2 +-
 arch/powerpc/platforms/pseries/hvCall.S       |  14 +-
 arch/powerpc/xmon/spr_access.S                |   4 +-
 36 files changed, 502 insertions(+), 232 deletions(-)

-- 
2.37.2



More information about the Linuxppc-dev mailing list