Skip to content

Commit 4ad0a4c

Browse files
committed
Merge tag 'powerpc-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Add HOTPLUG_SMT support (/sys/devices/system/cpu/smt) and honour the configured SMT state when hotplugging CPUs into the system - Combine final TLB flush and lazy TLB mm shootdown IPIs when using the Radix MMU to avoid a broadcast TLBIE flush on exit - Drop the exclusion between ptrace/perf watchpoints, and drop the now unused associated arch hooks - Add support for the "nohlt" command line option to disable CPU idle - Add support for -fpatchable-function-entry for ftrace, with GCC >= 13.1 - Rework memory block size determination, and support 256MB size on systems with GPUs that have hotpluggable memory - Various other small features and fixes Thanks to Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Athira Rajeev, Benjamin Gray, Christophe Leroy, Frederic Barrat, Gautam Menghani, Geoff Levand, Hari Bathini, Immad Mir, Jialin Zhang, Joel Stanley, Jordan Niethe, Justin Stitt, Kajol Jain, Kees Cook, Krzysztof Kozlowski, Laurent Dufour, Liang He, Linus Walleij, Mahesh Salgaonkar, Masahiro Yamada, Michal Suchanek, Nageswara R Sastry, Nathan Chancellor, Nathan Lynch, Naveen N Rao, Nicholas Piggin, Nick Desaulniers, Omar Sandoval, Randy Dunlap, Reza Arbab, Rob Herring, Russell Currey, Sourabh Jain, Thomas Gleixner, Trevor Woerner, Uwe Kleine-König, Vaibhav Jain, Xiongfeng Wang, Yuan Tan, Zhang Rui, and Zheng Zengkai. * tag 'powerpc-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (135 commits) macintosh/ams: linux/platform_device.h is needed powerpc/xmon: Reapply "Relax frame size for clang" powerpc/mm/book3s64: Use 256M as the upper limit with coherent device memory attached powerpc/mm/book3s64: Fix build error with SPARSEMEM disabled powerpc/iommu: Fix notifiers being shared by PCI and VIO buses powerpc/mpc5xxx: Add missing fwnode_handle_put() powerpc/config: Disable SLAB_DEBUG_ON in skiroot powerpc/pseries: Remove unused hcall tracing instruction powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n powerpc: dts: add missing space before { powerpc/eeh: Use pci_dev_id() to simplify the code powerpc/64s: Move CPU -mtune options into Kconfig powerpc/powermac: Fix unused function warning powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT powerpc: Don't include lppaca.h in paca.h powerpc/pseries: Move hcall_vphn() prototype into vphn.h powerpc/pseries: Move VPHN constants into vphn.h cxl: Drop unused detach_spa() powerpc: Drop zalloc_maybe_bootmem() powerpc/powernv: Use struct opal_prd_msg in more places ...
2 parents df57721 + 85a6164 commit 4ad0a4c

File tree

305 files changed

+4042
-3290
lines changed

Some content is hidden

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

305 files changed

+4042
-3290
lines changed

Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,163 @@ Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
8080
Description: read only
8181
This sysfs file exposes the cpumask which is designated to make
8282
HCALLs to retrieve hv-gpci pmu event counter data.
83+
84+
What: /sys/devices/hv_gpci/interface/processor_bus_topology
85+
Date: July 2023
86+
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
87+
Description: admin read only
88+
This sysfs file exposes the system topology information by making HCALL
89+
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
90+
PROCESSOR_BUS_TOPOLOGY(0xD0).
91+
92+
* This sysfs file will be created only for power10 and above platforms.
93+
94+
* User needs root privileges to read data from this sysfs file.
95+
96+
* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
97+
"H_AUTHORITY" or "H_PARAMETER" as the return type.
98+
99+
HCALL with return error type "H_AUTHORITY" can be resolved during
100+
runtime by setting "Enable Performance Information Collection" option.
101+
102+
* The end user reading this sysfs file must decode the content as per
103+
underlying platform/firmware.
104+
105+
Possible error codes while reading this sysfs file:
106+
107+
* "-EPERM" : Partition is not permitted to retrieve performance information,
108+
required to set "Enable Performance Information Collection" option.
109+
110+
* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
111+
or because of some hardware error. Refer to getPerfCountInfo documentation for
112+
more information.
113+
114+
* "-EFBIG" : System information exceeds PAGE_SIZE.
115+
116+
What: /sys/devices/hv_gpci/interface/processor_config
117+
Date: July 2023
118+
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
119+
Description: admin read only
120+
This sysfs file exposes the system topology information by making HCALL
121+
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
122+
PROCESSOR_CONFIG(0x90).
123+
124+
* This sysfs file will be created only for power10 and above platforms.
125+
126+
* User needs root privileges to read data from this sysfs file.
127+
128+
* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
129+
"H_AUTHORITY" or "H_PARAMETER" as the return type.
130+
131+
HCALL with return error type "H_AUTHORITY" can be resolved during
132+
runtime by setting "Enable Performance Information Collection" option.
133+
134+
* The end user reading this sysfs file must decode the content as per
135+
underlying platform/firmware.
136+
137+
Possible error codes while reading this sysfs file:
138+
139+
* "-EPERM" : Partition is not permitted to retrieve performance information,
140+
required to set "Enable Performance Information Collection" option.
141+
142+
* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
143+
or because of some hardware error. Refer to getPerfCountInfo documentation for
144+
more information.
145+
146+
* "-EFBIG" : System information exceeds PAGE_SIZE.
147+
148+
What: /sys/devices/hv_gpci/interface/affinity_domain_via_virtual_processor
149+
Date: July 2023
150+
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
151+
Description: admin read only
152+
This sysfs file exposes the system topology information by making HCALL
153+
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
154+
AFFINITY_DOMAIN_INFORMATION_BY_VIRTUAL_PROCESSOR(0xA0).
155+
156+
* This sysfs file will be created only for power10 and above platforms.
157+
158+
* User needs root privileges to read data from this sysfs file.
159+
160+
* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
161+
"H_AUTHORITY" or "H_PARAMETER" as the return type.
162+
163+
HCALL with return error type "H_AUTHORITY" can be resolved during
164+
runtime by setting "Enable Performance Information Collection" option.
165+
166+
* The end user reading this sysfs file must decode the content as per
167+
underlying platform/firmware.
168+
169+
Possible error codes while reading this sysfs file:
170+
171+
* "-EPERM" : Partition is not permitted to retrieve performance information,
172+
required to set "Enable Performance Information Collection" option.
173+
174+
* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
175+
or because of some hardware error. Refer to getPerfCountInfo documentation for
176+
more information.
177+
178+
* "-EFBIG" : System information exceeds PAGE_SIZE.
179+
180+
What: /sys/devices/hv_gpci/interface/affinity_domain_via_domain
181+
Date: July 2023
182+
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
183+
Description: admin read only
184+
This sysfs file exposes the system topology information by making HCALL
185+
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
186+
AFFINITY_DOMAIN_INFORMATION_BY_DOMAIN(0xB0).
187+
188+
* This sysfs file will be created only for power10 and above platforms.
189+
190+
* User needs root privileges to read data from this sysfs file.
191+
192+
* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
193+
"H_AUTHORITY" or "H_PARAMETER" as the return type.
194+
195+
HCALL with return error type "H_AUTHORITY" can be resolved during
196+
runtime by setting "Enable Performance Information Collection" option.
197+
198+
* The end user reading this sysfs file must decode the content as per
199+
underlying platform/firmware.
200+
201+
Possible error codes while reading this sysfs file:
202+
203+
* "-EPERM" : Partition is not permitted to retrieve performance information,
204+
required to set "Enable Performance Information Collection" option.
205+
206+
* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
207+
or because of some hardware error. Refer to getPerfCountInfo documentation for
208+
more information.
209+
210+
* "-EFBIG" : System information exceeds PAGE_SIZE.
211+
212+
What: /sys/devices/hv_gpci/interface/affinity_domain_via_partition
213+
Date: July 2023
214+
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
215+
Description: admin read only
216+
This sysfs file exposes the system topology information by making HCALL
217+
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
218+
AFFINITY_DOMAIN_INFORMATION_BY_PARTITION(0xB1).
219+
220+
* This sysfs file will be created only for power10 and above platforms.
221+
222+
* User needs root privileges to read data from this sysfs file.
223+
224+
* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
225+
"H_AUTHORITY" or "H_PARAMETER" as the return type.
226+
227+
HCALL with return error type "H_AUTHORITY" can be resolved during
228+
runtime by setting "Enable Performance Information Collection" option.
229+
230+
* The end user reading this sysfs file must decode the content as per
231+
underlying platform/firmware.
232+
233+
Possible error codes while reading this sysfs file:
234+
235+
* "-EPERM" : Partition is not permitted to retrieve performance information,
236+
required to set "Enable Performance Information Collection" option.
237+
238+
* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
239+
or because of some hardware error. Refer to getPerfCountInfo documentation for
240+
more information.
241+
242+
* "-EFBIG" : System information exceeds PAGE_SIZE.

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3753,7 +3753,7 @@
37533753

37543754
nohibernate [HIBERNATION] Disable hibernation and resume.
37553755

3756-
nohlt [ARM,ARM64,MICROBLAZE,MIPS,SH] Forces the kernel to
3756+
nohlt [ARM,ARM64,MICROBLAZE,MIPS,PPC,SH] Forces the kernel to
37573757
busy wait in do_idle() and not use the arch_cpu_idle()
37583758
implementation; requires CONFIG_GENERIC_IDLE_POLL_SETUP
37593759
to be effective. This is useful on platforms where the
@@ -3889,10 +3889,10 @@
38893889
nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
38903890
and disable the IO APIC. legacy for "maxcpus=0".
38913891

3892-
nosmt [KNL,MIPS,S390] Disable symmetric multithreading (SMT).
3892+
nosmt [KNL,MIPS,PPC,S390] Disable symmetric multithreading (SMT).
38933893
Equivalent to smt=1.
38943894

3895-
[KNL,X86] Disable symmetric multithreading (SMT).
3895+
[KNL,X86,PPC] Disable symmetric multithreading (SMT).
38963896
nosmt=force: Force disable SMT, cannot be undone
38973897
via the sysfs control file.
38983898

Documentation/powerpc/ptrace.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ that's extendable and that covers both BookE and server processors, so
1515
that GDB doesn't need to special-case each of them. We added the
1616
following 3 new ptrace requests.
1717

18-
1. PTRACE_PPC_GETHWDEBUGINFO
18+
1. PPC_PTRACE_GETHWDBGINFO
1919
============================
2020

2121
Query for GDB to discover the hardware debug features. The main info to
@@ -48,7 +48,7 @@ features will have bits indicating whether there is support for::
4848
#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10
4949
#define PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 0x20
5050

51-
2. PTRACE_SETHWDEBUG
51+
2. PPC_PTRACE_SETHWDEBUG
5252

5353
Sets a hardware breakpoint or watchpoint, according to the provided structure::
5454

@@ -88,7 +88,7 @@ that the BookE supports. COMEFROM breakpoints available in server processors
8888
are not contemplated, but that is out of the scope of this work.
8989

9090
ptrace will return an integer (handle) uniquely identifying the breakpoint or
91-
watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG
91+
watchpoint just created. This integer will be used in the PPC_PTRACE_DELHWDEBUG
9292
request to ask for its removal. Return -ENOSPC if the requested breakpoint
9393
can't be allocated on the registers.
9494

@@ -150,7 +150,7 @@ Some examples of using the structure to:
150150
p.addr2 = (uint64_t) end_range;
151151
p.condition_value = 0;
152152

153-
3. PTRACE_DELHWDEBUG
153+
3. PPC_PTRACE_DELHWDEBUG
154154

155155
Takes an integer which identifies an existing breakpoint or watchpoint
156156
(i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the

arch/powerpc/Kconfig

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,15 @@ config PPC
188188
select DYNAMIC_FTRACE if FUNCTION_TRACER
189189
select EDAC_ATOMIC_SCRUB
190190
select EDAC_SUPPORT
191+
select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if ARCH_USING_PATCHABLE_FUNCTION_ENTRY
191192
select GENERIC_ATOMIC64 if PPC32
192193
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
193194
select GENERIC_CMOS_UPDATE
194195
select GENERIC_CPU_AUTOPROBE
195196
select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
196197
select GENERIC_EARLY_IOREMAP
197198
select GENERIC_GETTIMEOFDAY
199+
select GENERIC_IDLE_POLL_SETUP
198200
select GENERIC_IOREMAP
199201
select GENERIC_IRQ_SHOW
200202
select GENERIC_IRQ_SHOW_LEVEL
@@ -229,8 +231,8 @@ config PPC
229231
select HAVE_DEBUG_KMEMLEAK
230232
select HAVE_DEBUG_STACKOVERFLOW
231233
select HAVE_DYNAMIC_FTRACE
232-
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if MPROFILE_KERNEL || PPC32
233-
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL || PPC32
234+
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
235+
select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
234236
select HAVE_EBPF_JIT
235237
select HAVE_EFFICIENT_UNALIGNED_ACCESS
236238
select HAVE_FAST_GUP
@@ -258,7 +260,7 @@ config PPC
258260
select HAVE_MOD_ARCH_SPECIFIC
259261
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
260262
select HAVE_OPTPROBES
261-
select HAVE_OBJTOOL if PPC32 || MPROFILE_KERNEL
263+
select HAVE_OBJTOOL if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
262264
select HAVE_OBJTOOL_MCOUNT if HAVE_OBJTOOL
263265
select HAVE_PERF_EVENTS
264266
select HAVE_PERF_EVENTS_NMI if PPC64
@@ -275,6 +277,8 @@ config PPC
275277
select HAVE_SYSCALL_TRACEPOINTS
276278
select HAVE_VIRT_CPU_ACCOUNTING
277279
select HAVE_VIRT_CPU_ACCOUNTING_GEN
280+
select HOTPLUG_SMT if HOTPLUG_CPU
281+
select SMT_NUM_THREADS_DYNAMIC
278282
select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
279283
select IOMMU_HELPER if PPC64
280284
select IRQ_DOMAIN
@@ -554,6 +558,13 @@ config MPROFILE_KERNEL
554558
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
555559
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN
556560

561+
config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
562+
depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
563+
depends on $(cc-option,-fpatchable-function-entry=2)
564+
def_bool y if PPC32
565+
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
566+
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
567+
557568
config HOTPLUG_CPU
558569
bool "Support for enabling/disabling CPUs"
559570
depends on SMP && (PPC_PSERIES || \
@@ -1126,12 +1137,6 @@ config FSL_GTM
11261137
help
11271138
Freescale General-purpose Timers support
11281139

1129-
config PCI_8260
1130-
bool
1131-
depends on PCI && 8260
1132-
select PPC_INDIRECT_PCI
1133-
default y
1134-
11351140
config FSL_RIO
11361141
bool "Freescale Embedded SRIO Controller support"
11371142
depends on RAPIDIO = y && HAVE_RAPIDIO

arch/powerpc/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,21 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD))
143143
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
144144

145145
ifdef CONFIG_FUNCTION_TRACER
146+
ifdef CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY
147+
KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
148+
CC_FLAGS_FTRACE := -fpatchable-function-entry=2
149+
else
146150
CC_FLAGS_FTRACE := -pg
147151
ifdef CONFIG_MPROFILE_KERNEL
148152
CC_FLAGS_FTRACE += -mprofile-kernel
149153
endif
150154
endif
155+
endif
151156

152157
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
153158
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
154159

155-
CFLAGS-$(CONFIG_POWERPC64_CPU) += $(call cc-option,-mtune=power10, \
156-
$(call cc-option,-mtune=power9, \
157-
$(call cc-option,-mtune=power8)))
160+
CFLAGS-y += $(CONFIG_TUNE_CPU)
158161

159162
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
160163

arch/powerpc/boot/dts/fsl/c293si-post.dtsi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@
124124
reg = <0x80000 0x20000>;
125125
ranges = <0x0 0x80000 0x20000>;
126126

127-
jr@1000{
127+
jr@1000 {
128128
interrupts = <45 2 0 0>;
129129
};
130-
jr@2000{
130+
jr@2000 {
131131
interrupts = <57 2 0 0>;
132132
};
133133
};
@@ -140,10 +140,10 @@
140140
reg = <0xa0000 0x20000>;
141141
ranges = <0x0 0xa0000 0x20000>;
142142

143-
jr@1000{
143+
jr@1000 {
144144
interrupts = <49 2 0 0>;
145145
};
146-
jr@2000{
146+
jr@2000 {
147147
interrupts = <50 2 0 0>;
148148
};
149149
};
@@ -156,10 +156,10 @@
156156
reg = <0xc0000 0x20000>;
157157
ranges = <0x0 0xc0000 0x20000>;
158158

159-
jr@1000{
159+
jr@1000 {
160160
interrupts = <55 2 0 0>;
161161
};
162-
jr@2000{
162+
jr@2000 {
163163
interrupts = <56 2 0 0>;
164164
};
165165
};

arch/powerpc/boot/dts/fsl/p1022rdk.dts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,23 @@
6060
compatible = "st,m41t62";
6161
reg = <0x68>;
6262
};
63-
adt7461@4c{
63+
adt7461@4c {
6464
compatible = "adi,adt7461";
6565
reg = <0x4c>;
6666
};
67-
zl6100@21{
67+
zl6100@21 {
6868
compatible = "isil,zl6100";
6969
reg = <0x21>;
7070
};
71-
zl6100@24{
71+
zl6100@24 {
7272
compatible = "isil,zl6100";
7373
reg = <0x24>;
7474
};
75-
zl6100@26{
75+
zl6100@26 {
7676
compatible = "isil,zl6100";
7777
reg = <0x26>;
7878
};
79-
zl6100@29{
79+
zl6100@29 {
8080
compatible = "isil,zl6100";
8181
reg = <0x29>;
8282
};

arch/powerpc/boot/dts/fsl/p1022si-post.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
fsl,has-rstcr;
239239
};
240240

241-
power@e0070{
241+
power@e0070 {
242242
compatible = "fsl,mpc8536-pmc", "fsl,mpc8548-pmc";
243243
reg = <0xe0070 0x20>;
244244
};

0 commit comments

Comments
 (0)