Skip to content

Commit 42d9e8b

Browse files
committed
Merge tag 'powerpc-6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Rework kfence support for the HPT MMU to work on systems with >= 16TB of RAM. - Remove the powerpc "maple" platform, used by the "Yellow Dog Powerstation". - Add support for DYNAMIC_FTRACE_WITH_CALL_OPS, DYNAMIC_FTRACE_WITH_DIRECT_CALLS & BPF Trampolines. - Add support for running KVM nested guests on Power11. - Other small features, cleanups and fixes. Thanks to Amit Machhiwal, Arnd Bergmann, Christophe Leroy, Costa Shulyupin, David Hunter, David Wang, Disha Goel, Gautam Menghani, Geert Uytterhoeven, Hari Bathini, Julia Lawall, Kajol Jain, Keith Packard, Lukas Bulwahn, Madhavan Srinivasan, Markus Elfring, Michal Suchanek, Ming Lei, Mukesh Kumar Chaurasiya, Nathan Chancellor, Naveen N Rao, Nicholas Piggin, Nysal Jan K.A, Paulo Miguel Almeida, Pavithra Prakash, Ritesh Harjani (IBM), Rob Herring (Arm), Sachin P Bappalige, Shen Lichuan, Simon Horman, Sourabh Jain, Thomas Weißschuh, Thorsten Blum, Thorsten Leemhuis, Venkat Rao Bagalkote, Zhang Zekun, and zhang jiao. * tag 'powerpc-6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (89 commits) EDAC/powerpc: Remove PPC_MAPLE drivers powerpc/perf: Add per-task/process monitoring to vpa_pmu driver powerpc/kvm: Add vpa latency counters to kvm_vcpu_arch docs: ABI: sysfs-bus-event_source-devices-vpa-pmu: Document sysfs event format entries for vpa_pmu powerpc/perf: Add perf interface to expose vpa counters MAINTAINERS: powerpc: Mark Maddy as "M" powerpc/Makefile: Allow overriding CPP powerpc-km82xx.c: replace of_node_put() with __free ps3: Correct some typos in comments powerpc/kexec: Fix return of uninitialized variable macintosh: Use common error handling code in via_pmu_led_init() powerpc/powermac: Use of_property_match_string() in pmac_has_backlight_type() powerpc: remove dead config options for MPC85xx platform support powerpc/xive: Use cpumask_intersects() selftests/powerpc: Remove the path after initialization. powerpc/xmon: symbol lookup length fixed powerpc/ep8248e: Use %pa to format resource_size_t powerpc/ps3: Reorganize kerneldoc parameter names KVM: PPC: Book3S HV: Fix kmv -> kvm typo powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static ...
2 parents 5c00ff7 + 3c592ce commit 42d9e8b

File tree

164 files changed

+3056
-3583
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+3056
-3583
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
What: /sys/bus/event_source/devices/vpa_pmu/format
2+
Date: November 2024
3+
Contact: Linux on PowerPC Developer List <[email protected]>
4+
Description: Read-only. Attribute group to describe the magic bits
5+
that go into perf_event_attr.config for a particular pmu.
6+
(See ABI/testing/sysfs-bus-event_source-devices-format).
7+
8+
Each attribute under this group defines a bit range of the
9+
perf_event_attr.config. Supported attribute are listed
10+
below::
11+
event = "config:0-31" - event ID
12+
13+
For example::
14+
15+
l1_to_l2_lat = "event=0x1"
16+
17+
What: /sys/bus/event_source/devices/vpa_pmu/events
18+
Date: November 2024
19+
Contact: Linux on PowerPC Developer List <[email protected]>
20+
Description: Read-only. Attribute group to describe performance monitoring
21+
events for the Virtual Processor Area events. Each attribute
22+
in this group describes a single performance monitoring event
23+
supported by vpa_pmu. The name of the file is the name of
24+
the event (See ABI/testing/sysfs-bus-event_source-devices-events).

Documentation/arch/powerpc/booting.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ given platform based on the content of the device-tree. Thus, you
9393
should:
9494

9595
a) add your platform support as a _boolean_ option in
96-
arch/powerpc/Kconfig, following the example of PPC_PSERIES,
97-
PPC_PMAC and PPC_MAPLE. The latter is probably a good
96+
arch/powerpc/Kconfig, following the example of PPC_PSERIES
97+
and PPC_PMAC. The latter is probably a good
9898
example of a board support to start from.
9999

100100
b) create your main platform file as

MAINTAINERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -13140,7 +13140,7 @@ M: Michael Ellerman <[email protected]>
1314013140
R: Nicholas Piggin <[email protected]>
1314113141
R: Christophe Leroy <[email protected]>
1314213142
R: Naveen N Rao <[email protected]>
13143-
R: Madhavan Srinivasan <[email protected]>
13143+
M: Madhavan Srinivasan <[email protected]>
1314413144
1314513145
S: Supported
1314613146
W: https://github.com/linuxppc/wiki/wiki

arch/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -1691,4 +1691,10 @@ config CC_HAS_SANE_FUNCTION_ALIGNMENT
16911691
config ARCH_NEED_CMPXCHG_1_EMU
16921692
bool
16931693

1694+
config ARCH_WANTS_PRE_LINK_VMLINUX
1695+
bool
1696+
help
1697+
An architecture can select this if it provides arch/<arch>/tools/Makefile
1698+
with .arch.vmlinux.o target to be linked into vmlinux.
1699+
16941700
endmenu

arch/powerpc/Kbuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ obj-$(CONFIG_KEXEC_CORE) += kexec/
1919
obj-$(CONFIG_KEXEC_FILE) += purgatory/
2020

2121
# for cleaning
22-
subdir- += boot
22+
subdir- += boot tools

arch/powerpc/Kconfig

+23-3
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ config PPC
234234
select HAVE_DEBUG_STACKOVERFLOW
235235
select HAVE_DYNAMIC_FTRACE
236236
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
237+
select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS if PPC_FTRACE_OUT_OF_LINE || (PPC32 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY)
238+
select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS if HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
237239
select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
238240
select HAVE_EBPF_JIT
239241
select HAVE_EFFICIENT_UNALIGNED_ACCESS
@@ -243,7 +245,7 @@ config PPC
243245
select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
244246
select HAVE_FUNCTION_ERROR_INJECTION
245247
select HAVE_FUNCTION_GRAPH_TRACER
246-
select HAVE_FUNCTION_TRACER if PPC64 || (PPC32 && CC_IS_GCC)
248+
select HAVE_FUNCTION_TRACER if !COMPILE_TEST && (PPC64 || (PPC32 && CC_IS_GCC))
247249
select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
248250
select HAVE_GENERIC_VDSO
249251
select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC_BOOK3S_64 && SMP
@@ -273,10 +275,12 @@ config PPC
273275
select HAVE_REGS_AND_STACK_ACCESS_API
274276
select HAVE_RELIABLE_STACKTRACE
275277
select HAVE_RSEQ
278+
select HAVE_SAMPLE_FTRACE_DIRECT if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
279+
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
276280
select HAVE_SETUP_PER_CPU_AREA if PPC64
277281
select HAVE_SOFTIRQ_ON_OWN_STACK
278-
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
279-
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
282+
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
283+
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,$(m64-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=0)
280284
select HAVE_STATIC_CALL if PPC32
281285
select HAVE_SYSCALL_TRACEPOINTS
282286
select HAVE_VIRT_CPU_ACCOUNTING
@@ -569,6 +573,22 @@ config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
569573
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
570574
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
571575

576+
config PPC_FTRACE_OUT_OF_LINE
577+
def_bool PPC64 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY
578+
select ARCH_WANTS_PRE_LINK_VMLINUX
579+
580+
config PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE
581+
int "Number of ftrace out-of-line stubs to reserve within .text"
582+
depends on PPC_FTRACE_OUT_OF_LINE
583+
default 32768
584+
help
585+
Number of stubs to reserve for use by ftrace. This space is
586+
reserved within .text, and is distinct from any additional space
587+
added at the end of .text before the final vmlinux link. Set to
588+
zero to have stubs only be generated at the end of vmlinux (only
589+
if the size of vmlinux is less than 32MB). Set to a higher value
590+
if building vmlinux larger than 48MB.
591+
572592
config HOTPLUG_CPU
573593
bool "Support for enabling/disabling CPUs"
574594
depends on SMP && (PPC_PSERIES || \

arch/powerpc/Kconfig.debug

-6
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,6 @@ config PPC_EARLY_DEBUG_RTAS_CONSOLE
223223
help
224224
Select this to enable early debugging via the RTAS console.
225225

226-
config PPC_EARLY_DEBUG_MAPLE
227-
bool "Maple real mode"
228-
depends on PPC_MAPLE
229-
help
230-
Select this to enable early debugging for Maple.
231-
232226
config PPC_EARLY_DEBUG_PAS_REALMODE
233227
bool "PA Semi real mode"
234228
depends on PPC_PASEMI

arch/powerpc/Makefile

+16-14
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
6262
endif
6363

6464
ifdef CONFIG_CPU_LITTLE_ENDIAN
65-
KBUILD_CFLAGS += -mlittle-endian
65+
KBUILD_CPPFLAGS += -mlittle-endian
6666
KBUILD_LDFLAGS += -EL
6767
LDEMULATION := lppc
6868
GNUTARGET := powerpcle
6969
MULTIPLEWORD := -mno-multiple
7070
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect)
7171
else
72-
KBUILD_CFLAGS += $(call cc-option,-mbig-endian)
72+
KBUILD_CPPFLAGS += $(call cc-option,-mbig-endian)
7373
KBUILD_LDFLAGS += -EB
7474
LDEMULATION := ppc
7575
GNUTARGET := powerpc
@@ -95,18 +95,11 @@ aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
9595
aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
9696

9797
ifeq ($(HAS_BIARCH),y)
98-
KBUILD_CFLAGS += -m$(BITS)
98+
KBUILD_CPPFLAGS += -m$(BITS)
9999
KBUILD_AFLAGS += -m$(BITS)
100100
KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION)
101101
endif
102102

103-
cflags-$(CONFIG_STACKPROTECTOR) += -mstack-protector-guard=tls
104-
ifdef CONFIG_PPC64
105-
cflags-$(CONFIG_STACKPROTECTOR) += -mstack-protector-guard-reg=r13
106-
else
107-
cflags-$(CONFIG_STACKPROTECTOR) += -mstack-protector-guard-reg=r2
108-
endif
109-
110103
LDFLAGS_vmlinux-y := -Bstatic
111104
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie
112105
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) += -z notext
@@ -155,7 +148,15 @@ CC_FLAGS_NO_FPU := $(call cc-option,-msoft-float)
155148
ifdef CONFIG_FUNCTION_TRACER
156149
ifdef CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY
157150
KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
151+
ifdef CONFIG_PPC_FTRACE_OUT_OF_LINE
152+
CC_FLAGS_FTRACE := -fpatchable-function-entry=1
153+
else
154+
ifdef CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS # PPC32 only
155+
CC_FLAGS_FTRACE := -fpatchable-function-entry=3,1
156+
else
158157
CC_FLAGS_FTRACE := -fpatchable-function-entry=2
158+
endif
159+
endif
159160
else
160161
CC_FLAGS_FTRACE := -pg
161162
ifdef CONFIG_MPROFILE_KERNEL
@@ -175,7 +176,6 @@ KBUILD_CPPFLAGS += -I $(srctree)/arch/powerpc $(asinstr)
175176
KBUILD_AFLAGS += $(AFLAGS-y)
176177
KBUILD_CFLAGS += $(CC_FLAGS_NO_FPU)
177178
KBUILD_CFLAGS += $(CFLAGS-y)
178-
CPP = $(CC) -E $(KBUILD_CFLAGS)
179179

180180
CHECKFLAGS += -m$(BITS) -D__powerpc__ -D__powerpc$(BITS)__
181181
ifdef CONFIG_CPU_BIG_ENDIAN
@@ -359,7 +359,7 @@ define archhelp
359359
echo ' install - Install kernel using'
360360
echo ' (your) ~/bin/$(INSTALLKERNEL) or'
361361
echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
362-
echo ' install to $$(INSTALL_PATH) and run lilo'
362+
echo ' install to $$(INSTALL_PATH)'
363363
echo ' *_defconfig - Select default config from arch/powerpc/configs'
364364
echo ''
365365
echo ' Targets with <dt> embed a device tree blob inside the image'
@@ -402,9 +402,11 @@ prepare: stack_protector_prepare
402402
PHONY += stack_protector_prepare
403403
stack_protector_prepare: prepare0
404404
ifdef CONFIG_PPC64
405-
$(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' include/generated/asm-offsets.h))
405+
$(eval KBUILD_CFLAGS += -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 \
406+
-mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' include/generated/asm-offsets.h))
406407
else
407-
$(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "TASK_CANARY") print $$3;}' include/generated/asm-offsets.h))
408+
$(eval KBUILD_CFLAGS += -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 \
409+
-mstack-protector-guard-offset=$(shell awk '{if ($$2 == "TASK_CANARY") print $$3;}' include/generated/asm-offsets.h))
408410
endif
409411
endif
410412

arch/powerpc/Makefile.postlink

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ else
2424
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@"
2525
endif
2626

27+
quiet_cmd_ftrace_check = CHKFTRC $@
28+
cmd_ftrace_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/ftrace_check.sh "$(NM)" "$@"
29+
2730
# `@true` prevents complaint when there is nothing to be done
2831

2932
vmlinux: FORCE
@@ -34,6 +37,11 @@ endif
3437
ifdef CONFIG_RELOCATABLE
3538
$(call if_changed,relocs_check)
3639
endif
40+
ifdef CONFIG_FUNCTION_TRACER
41+
ifndef CONFIG_PPC64_ELF_ABI_V1
42+
$(call cmd,ftrace_check)
43+
endif
44+
endif
3745

3846
clean:
3947
rm -f .tmp_symbols.txt

arch/powerpc/boot/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ zImage.coff
3030
zImage.epapr
3131
zImage.holly
3232
zImage.*lds
33-
zImage.maple
3433
zImage.miboot
3534
zImage.pmac
3635
zImage.pseries

arch/powerpc/boot/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ quiet_cmd_wrap = WRAP $@
276276

277277
image-$(CONFIG_PPC_PSERIES) += zImage.pseries
278278
image-$(CONFIG_PPC_POWERNV) += zImage.pseries
279-
image-$(CONFIG_PPC_MAPLE) += zImage.maple
280279
image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
281280
image-$(CONFIG_PPC_PS3) += dtbImage.ps3
282281
image-$(CONFIG_PPC_CHRP) += zImage.chrp
@@ -444,7 +443,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
444443
clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
445444
zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
446445
zImage.miboot zImage.pmac zImage.pseries \
447-
zImage.maple simpleImage.* otheros.bld
446+
simpleImage.* otheros.bld
448447

449448
# clean up files cached by wrapper
450449
clean-kernel-base := vmlinux.strip vmlinux.bin

arch/powerpc/boot/wrapper

+1-6
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,6 @@ pseries)
271271
fi
272272
make_space=n
273273
;;
274-
maple)
275-
platformo="$object/of.o $object/epapr.o"
276-
link_address='0x400000'
277-
make_space=n
278-
;;
279274
pmac|chrp)
280275
platformo="$object/of.o $object/epapr.o"
281276
make_space=n
@@ -517,7 +512,7 @@ fi
517512

518513
# post-processing needed for some platforms
519514
case "$platform" in
520-
pseries|chrp|maple)
515+
pseries|chrp)
521516
$objbin/addnote "$ofile"
522517
;;
523518
coff)

arch/powerpc/configs/maple_defconfig

-111
This file was deleted.

0 commit comments

Comments
 (0)