Skip to content

Commit

Permalink
Merge tag 'powerpc-6.6-1' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/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
  ...
  • Loading branch information
torvalds committed Aug 31, 2023
2 parents df57721 + 85a6164 commit 4ad0a4c
Show file tree
Hide file tree
Showing 305 changed files with 4,042 additions and 3,290 deletions.
160 changes: 160 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,163 @@ Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: read only
This sysfs file exposes the cpumask which is designated to make
HCALLs to retrieve hv-gpci pmu event counter data.

What: /sys/devices/hv_gpci/interface/processor_bus_topology
Date: July 2023
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
PROCESSOR_BUS_TOPOLOGY(0xD0).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/processor_config
Date: July 2023
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
PROCESSOR_CONFIG(0x90).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/affinity_domain_via_virtual_processor
Date: July 2023
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
AFFINITY_DOMAIN_INFORMATION_BY_VIRTUAL_PROCESSOR(0xA0).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/affinity_domain_via_domain
Date: July 2023
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
AFFINITY_DOMAIN_INFORMATION_BY_DOMAIN(0xB0).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/affinity_domain_via_partition
Date: July 2023
Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
AFFINITY_DOMAIN_INFORMATION_BY_PARTITION(0xB1).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.
6 changes: 3 additions & 3 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3753,7 +3753,7 @@

nohibernate [HIBERNATION] Disable hibernation and resume.

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

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

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

Expand Down
8 changes: 4 additions & 4 deletions Documentation/powerpc/ptrace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ that's extendable and that covers both BookE and server processors, so
that GDB doesn't need to special-case each of them. We added the
following 3 new ptrace requests.

1. PTRACE_PPC_GETHWDEBUGINFO
1. PPC_PTRACE_GETHWDBGINFO
============================

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

2. PTRACE_SETHWDEBUG
2. PPC_PTRACE_SETHWDEBUG

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

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

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

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

3. PTRACE_DELHWDEBUG
3. PPC_PTRACE_DELHWDEBUG

Takes an integer which identifies an existing breakpoint or watchpoint
(i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the
Expand Down
23 changes: 14 additions & 9 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ config PPC
select DYNAMIC_FTRACE if FUNCTION_TRACER
select EDAC_ATOMIC_SCRUB
select EDAC_SUPPORT
select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if ARCH_USING_PATCHABLE_FUNCTION_ENTRY
select GENERIC_ATOMIC64 if PPC32
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
select GENERIC_CMOS_UPDATE
select GENERIC_CPU_AUTOPROBE
select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
select GENERIC_EARLY_IOREMAP
select GENERIC_GETTIMEOFDAY
select GENERIC_IDLE_POLL_SETUP
select GENERIC_IOREMAP
select GENERIC_IRQ_SHOW
select GENERIC_IRQ_SHOW_LEVEL
Expand Down Expand Up @@ -229,8 +231,8 @@ config PPC
select HAVE_DEBUG_KMEMLEAK
select HAVE_DEBUG_STACKOVERFLOW
select HAVE_DYNAMIC_FTRACE
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if MPROFILE_KERNEL || PPC32
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL || PPC32
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
select HAVE_EBPF_JIT
select HAVE_EFFICIENT_UNALIGNED_ACCESS
select HAVE_FAST_GUP
Expand Down Expand Up @@ -258,7 +260,7 @@ config PPC
select HAVE_MOD_ARCH_SPECIFIC
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
select HAVE_OPTPROBES
select HAVE_OBJTOOL if PPC32 || MPROFILE_KERNEL
select HAVE_OBJTOOL if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
select HAVE_OBJTOOL_MCOUNT if HAVE_OBJTOOL
select HAVE_PERF_EVENTS
select HAVE_PERF_EVENTS_NMI if PPC64
Expand All @@ -275,6 +277,8 @@ config PPC
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_VIRT_CPU_ACCOUNTING
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select HOTPLUG_SMT if HOTPLUG_CPU
select SMT_NUM_THREADS_DYNAMIC
select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
select IOMMU_HELPER if PPC64
select IRQ_DOMAIN
Expand Down Expand Up @@ -554,6 +558,13 @@ config MPROFILE_KERNEL
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN

config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
depends on $(cc-option,-fpatchable-function-entry=2)
def_bool y if PPC32
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN

config HOTPLUG_CPU
bool "Support for enabling/disabling CPUs"
depends on SMP && (PPC_PSERIES || \
Expand Down Expand Up @@ -1126,12 +1137,6 @@ config FSL_GTM
help
Freescale General-purpose Timers support

config PCI_8260
bool
depends on PCI && 8260
select PPC_INDIRECT_PCI
default y

config FSL_RIO
bool "Freescale Embedded SRIO Controller support"
depends on RAPIDIO = y && HAVE_RAPIDIO
Expand Down
9 changes: 6 additions & 3 deletions arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,21 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD))
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)

ifdef CONFIG_FUNCTION_TRACER
ifdef CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY
KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
CC_FLAGS_FTRACE := -fpatchable-function-entry=2
else
CC_FLAGS_FTRACE := -pg
ifdef CONFIG_MPROFILE_KERNEL
CC_FLAGS_FTRACE += -mprofile-kernel
endif
endif
endif

CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)

CFLAGS-$(CONFIG_POWERPC64_CPU) += $(call cc-option,-mtune=power10, \
$(call cc-option,-mtune=power9, \
$(call cc-option,-mtune=power8)))
CFLAGS-y += $(CONFIG_TUNE_CPU)

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

Expand Down
12 changes: 6 additions & 6 deletions arch/powerpc/boot/dts/fsl/c293si-post.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@
reg = <0x80000 0x20000>;
ranges = <0x0 0x80000 0x20000>;

jr@1000{
jr@1000 {
interrupts = <45 2 0 0>;
};
jr@2000{
jr@2000 {
interrupts = <57 2 0 0>;
};
};
Expand All @@ -140,10 +140,10 @@
reg = <0xa0000 0x20000>;
ranges = <0x0 0xa0000 0x20000>;

jr@1000{
jr@1000 {
interrupts = <49 2 0 0>;
};
jr@2000{
jr@2000 {
interrupts = <50 2 0 0>;
};
};
Expand All @@ -156,10 +156,10 @@
reg = <0xc0000 0x20000>;
ranges = <0x0 0xc0000 0x20000>;

jr@1000{
jr@1000 {
interrupts = <55 2 0 0>;
};
jr@2000{
jr@2000 {
interrupts = <56 2 0 0>;
};
};
Expand Down
10 changes: 5 additions & 5 deletions arch/powerpc/boot/dts/fsl/p1022rdk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@
compatible = "st,m41t62";
reg = <0x68>;
};
adt7461@4c{
adt7461@4c {
compatible = "adi,adt7461";
reg = <0x4c>;
};
zl6100@21{
zl6100@21 {
compatible = "isil,zl6100";
reg = <0x21>;
};
zl6100@24{
zl6100@24 {
compatible = "isil,zl6100";
reg = <0x24>;
};
zl6100@26{
zl6100@26 {
compatible = "isil,zl6100";
reg = <0x26>;
};
zl6100@29{
zl6100@29 {
compatible = "isil,zl6100";
reg = <0x29>;
};
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
fsl,has-rstcr;
};

power@e0070{
power@e0070 {
compatible = "fsl,mpc8536-pmc", "fsl,mpc8548-pmc";
reg = <0xe0070 0x20>;
};
Expand Down
Loading

0 comments on commit 4ad0a4c

Please sign in to comment.