Skip to content

RFC powerpc: first hack at pcrel addressing

Nicholas Piggin linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7powerpc: use 16-bit immediate for STACK_FRAME_REGS_MARKERarch/powerpc/include/asm/ptrace.h arch/powerpc/kernel/entry_32.S arch/powerpc/kernel/exceptions-64e.S +5 more+14 -303 replies
2/7powerpc/64: abstract asm global variable declaration and accessarch/powerpc/boot/opal-calls.S arch/powerpc/boot/ppc_asm.h arch/powerpc/include/asm/ppc_asm.h +9 more+118 -741 reply
3/7powerpc/64: provide a helper macro to load r2 with the kernel TOCarch/powerpc/include/asm/ppc_asm.h arch/powerpc/kernel/exceptions-64e.S arch/powerpc/kernel/exceptions-64s.S +5 more+20 -171 reply
4/7powerpc: 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+106 -1010 replies
5/7powerpc/64s: update generic cpu option name and compiler flagsarch/powerpc/Makefile arch/powerpc/platforms/Kconfig.cputype+6 -44 replies
6/7powerpc/64s: POWER10 CPU Kconfig build optionarch/powerpc/Makefile arch/powerpc/platforms/Kconfig.cputype+13 -20 replies
7/7powerpc/64s: Add option to build vmlinux with pcrel addressingarch/powerpc/Makefile arch/powerpc/include/asm/atomic.h arch/powerpc/include/asm/io.h +7 more+226 -50 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/7] powerpc: first hack at pcrel addressing

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(-)
Signature · 1 line
2.37.2