Skip to content

Commit d2f51bc

Browse files
committed
Automatic merge of 'next-test' into merge-test (2024-11-17 21:42)
2 parents 4f6d6ab + ba6d8ef commit d2f51bc

File tree

134 files changed

+2348
-2196
lines changed

Some content is hidden

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

134 files changed

+2348
-2196
lines changed

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
@@ -13071,7 +13071,7 @@ M: Michael Ellerman <[email protected]>
1307113071
R: Nicholas Piggin <[email protected]>
1307213072
R: Christophe Leroy <[email protected]>
1307313073
R: Naveen N Rao <[email protected]>
13074-
R: Madhavan Srinivasan <[email protected]>
13074+
M: Madhavan Srinivasan <[email protected]>
1307513075
1307613076
S: Supported
1307713077
W: https://github.com/linuxppc/wiki/wiki

arch/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -1682,4 +1682,10 @@ config CC_HAS_SANE_FUNCTION_ALIGNMENT
16821682
config ARCH_NEED_CMPXCHG_1_EMU
16831683
bool
16841684

1685+
config ARCH_WANTS_PRE_LINK_VMLINUX
1686+
bool
1687+
help
1688+
An architecture can select this if it provides arch/<arch>/tools/Makefile
1689+
with .arch.vmlinux.o target to be linked into vmlinux.
1690+
16851691
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

+21-1
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,6 +275,8 @@ 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
278282
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
@@ -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

+12-5
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,7 +95,7 @@ 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
@@ -148,7 +148,15 @@ CC_FLAGS_NO_FPU := $(call cc-option,-msoft-float)
148148
ifdef CONFIG_FUNCTION_TRACER
149149
ifdef CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY
150150
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
151157
CC_FLAGS_FTRACE := -fpatchable-function-entry=2
158+
endif
159+
endif
152160
else
153161
CC_FLAGS_FTRACE := -pg
154162
ifdef CONFIG_MPROFILE_KERNEL
@@ -168,7 +176,6 @@ KBUILD_CPPFLAGS += -I $(srctree)/arch/powerpc $(asinstr)
168176
KBUILD_AFLAGS += $(AFLAGS-y)
169177
KBUILD_CFLAGS += $(CC_FLAGS_NO_FPU)
170178
KBUILD_CFLAGS += $(CFLAGS-y)
171-
CPP = $(CC) -E $(KBUILD_CFLAGS)
172179

173180
CHECKFLAGS += -m$(BITS) -D__powerpc__ -D__powerpc$(BITS)__
174181
ifdef CONFIG_CPU_BIG_ENDIAN
@@ -352,7 +359,7 @@ define archhelp
352359
echo ' install - Install kernel using'
353360
echo ' (your) ~/bin/$(INSTALLKERNEL) or'
354361
echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
355-
echo ' install to $$(INSTALL_PATH) and run lilo'
362+
echo ' install to $$(INSTALL_PATH)'
356363
echo ' *_defconfig - Select default config from arch/powerpc/configs'
357364
echo ''
358365
echo ' Targets with <dt> embed a device tree blob inside the image'

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.

arch/powerpc/configs/ppc64_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ CONFIG_PPC_SMLPAR=y
4444
CONFIG_IBMEBUS=y
4545
CONFIG_PAPR_SCM=m
4646
CONFIG_PPC_SVM=y
47-
CONFIG_PPC_MAPLE=y
4847
CONFIG_PPC_PASEMI=y
4948
CONFIG_PPC_PASEMI_IOMMU=y
5049
CONFIG_PPC_PS3=y

arch/powerpc/include/asm/cputable.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ static inline void cpu_feature_keys_init(void) { }
193193
#define CPU_FTR_ARCH_31 LONG_ASM_CONST(0x0004000000000000)
194194
#define CPU_FTR_DAWR1 LONG_ASM_CONST(0x0008000000000000)
195195
#define CPU_FTR_DEXCR_NPHIE LONG_ASM_CONST(0x0010000000000000)
196+
#define CPU_FTR_P11_PVR LONG_ASM_CONST(0x0020000000000000)
196197

197198
#ifndef __ASSEMBLY__
198199

@@ -454,7 +455,7 @@ static inline void cpu_feature_keys_init(void) { }
454455
CPU_FTR_DAWR | CPU_FTR_DAWR1 | \
455456
CPU_FTR_DEXCR_NPHIE)
456457

457-
#define CPU_FTRS_POWER11 CPU_FTRS_POWER10
458+
#define CPU_FTRS_POWER11 (CPU_FTRS_POWER10 | CPU_FTR_P11_PVR)
458459

459460
#define CPU_FTRS_CELL (CPU_FTR_LWSYNC | \
460461
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
@@ -475,15 +476,15 @@ static inline void cpu_feature_keys_init(void) { }
475476
(CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | CPU_FTRS_POWER8 | \
476477
CPU_FTR_ALTIVEC_COMP | CPU_FTR_VSX_COMP | CPU_FTRS_POWER9 | \
477478
CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | \
478-
CPU_FTRS_POWER9_DD2_3 | CPU_FTRS_POWER10)
479+
CPU_FTRS_POWER9_DD2_3 | CPU_FTRS_POWER10 | CPU_FTRS_POWER11)
479480
#else
480481
#define CPU_FTRS_POSSIBLE \
481482
(CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | \
482483
CPU_FTRS_POWER6 | CPU_FTRS_POWER7 | CPU_FTRS_POWER8E | \
483484
CPU_FTRS_POWER8 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \
484485
CPU_FTR_VSX_COMP | CPU_FTR_ALTIVEC_COMP | CPU_FTRS_POWER9 | \
485486
CPU_FTRS_POWER9_DD2_1 | CPU_FTRS_POWER9_DD2_2 | \
486-
CPU_FTRS_POWER9_DD2_3 | CPU_FTRS_POWER10)
487+
CPU_FTRS_POWER9_DD2_3 | CPU_FTRS_POWER10 | CPU_FTRS_POWER11)
487488
#endif /* CONFIG_CPU_LITTLE_ENDIAN */
488489
#endif
489490
#else
@@ -547,15 +548,15 @@ enum {
547548
(CPU_FTRS_POSSIBLE & ~CPU_FTR_HVMODE & ~CPU_FTR_DBELL & \
548549
CPU_FTRS_POWER7 & CPU_FTRS_POWER8E & CPU_FTRS_POWER8 & \
549550
CPU_FTRS_POWER9 & CPU_FTRS_POWER9_DD2_1 & CPU_FTRS_POWER9_DD2_2 & \
550-
CPU_FTRS_POWER10 & CPU_FTRS_DT_CPU_BASE)
551+
CPU_FTRS_POWER10 & CPU_FTRS_POWER11 & CPU_FTRS_DT_CPU_BASE)
551552
#else
552553
#define CPU_FTRS_ALWAYS \
553554
(CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & \
554555
CPU_FTRS_POWER6 & CPU_FTRS_POWER7 & CPU_FTRS_CELL & \
555556
CPU_FTRS_PA6T & CPU_FTRS_POWER8 & CPU_FTRS_POWER8E & \
556557
~CPU_FTR_HVMODE & ~CPU_FTR_DBELL & CPU_FTRS_POSSIBLE & \
557558
CPU_FTRS_POWER9 & CPU_FTRS_POWER9_DD2_1 & CPU_FTRS_POWER9_DD2_2 & \
558-
CPU_FTRS_POWER10 & CPU_FTRS_DT_CPU_BASE)
559+
CPU_FTRS_POWER10 & CPU_FTRS_POWER11 & CPU_FTRS_DT_CPU_BASE)
559560
#endif /* CONFIG_CPU_LITTLE_ENDIAN */
560561
#endif
561562
#else

0 commit comments

Comments
 (0)