Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/8] ACPI: arm64: Support PMU on Heterogeneous Systems
@ 2026-11-16 18:21 Leo Yan
  2026-11-16 18:21 ` [PATCH 1/8] device property: Add firmware node IRQ affinity callbacks Leo Yan
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Leo Yan @ 2026-11-16 18:21 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Greg Kroah-Hartman,
	Danilo Krummrich, Johan Hovold, Andy Shevchenko, Daniel Scally,
	Heikki Krogerus, Sakari Ailus, Bartosz Golaszewski,
	Saravana Kannan, Will Deacon, Thomas Gleixner, Peter Zijlstra,
	Lorenzo Pieralisi, Hanjun Guo, Jeremy Linton, Marc Zyngier,
	Mark Rutland, Sudeep Holla, Rob Herring, Catalin Marinas
  Cc: Suzuki K Poulose, Mike Leach, James Clark, Anshuman Khandual,
	Al Grant, Johnny.Fan, linux-acpi, linux-kernel, driver-core,
	devicetree, linux-arm-kernel, linux-perf-users, Leo Yan

This series follows Johnny Fan's SPE/TRBE work [1], which requires
ACPI-specific IRQ affinity handling in the drivers. It provides a common
way to describe PPI affinity for devices created from the MADT.

Register one platform device for each group of CPUs with the same MIDR.
Associate a software node with each device to expose its CPU mask through
platform_get_irq_affinity(). SPE and TRBE drivers can then obtain affinity
without ACPI-specific handling or a processor-container companion.

Grouping by MIDR allows CPU PMU events to follow tasks across compatible
CPUs, including CPUs in different processor containers. SPE and TRBE
require a shared GSI within each group. CPU PMUs can also use per-CPU SPIs
and reuse the platform probe path used for DT. Move the common ACPI device
registration to drivers/acpi/arm64/.

This series has been tested on Orion O6, with four little Cortex-A520
cores (CPUs 2-5) and eight big Cortex-A720 cores (CPUs 0-1 and 6-11).
It exposes the following PMU devices:

  # ls /sys/bus/event_source/devices/
  arm_spe_0  armv8_pmuv3_0  armv8_pmuv3_1  breakpoint  cs_etm  kprobe  software  tracepoint  uprobe
  # cat /sys/bus/event_source/devices/armv8_pmuv3_0/cpus
  0-1,6-11
  # cat /sys/bus/event_source/devices/armv8_pmuv3_1/cpus
  2-5
  # cat /sys/bus/event_source/devices/arm_spe_0/cpumask
  0-1,6-11
  # ls /sys/bus/event_source/devices/cs_etm/sinks/
  trbe0  trbe1  trbe10  trbe11  trbe2  trbe3  trbe4  trbe5  trbe6  trbe7  trbe8  trbe9

The CPU PMU masks match the MIDR groups: eight A720 CPUs and four A520
CPUs. SPE uses the A720 mask, and TRBE exposes one sink per CPU.

[1] https://lore.kernel.org/linux-arm-kernel/20261102084153.3975282-1-johnny.fan@cixtech.com/

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Johnny.Fan (1):
      perf/arm_pmu: Register ACPI SPE and TRBE devices with software nodes

Leo Yan (7):
      device property: Add firmware node IRQ affinity callbacks
      device property: Add software-node IRQ affinity masks
      perf/arm_pmu: Prepare ACPI registration for per-CPU interrupts
      perf/arm_pmu: Register ACPI CPU PMUs as platform devices
      perf/arm_pmu: Support ACPI devices in the platform probe
      perf/arm_pmu: Use ACPI CPU affinity in IRQ handling
      ACPI: arm64: Move PMU device registration to drivers/acpi/arm64/

 MAINTAINERS                     |   1 +
 arch/arm64/include/asm/acpi.h   |   3 +
 drivers/acpi/arm64/Kconfig      |   4 +
 drivers/acpi/arm64/Makefile     |   1 +
 drivers/acpi/arm64/pmu.c        | 393 +++++++++++++++++++++++++++++++++++
 drivers/acpi/property.c         |   8 +
 drivers/base/platform.c         |   7 +-
 drivers/base/property.c         |  15 ++
 drivers/base/swnode.c           |  53 +++++
 drivers/of/property.c           |   7 +
 drivers/perf/Kconfig            |   4 -
 drivers/perf/Makefile           |   1 -
 drivers/perf/arm_pmu.c          |   3 +-
 drivers/perf/arm_pmu_acpi.c     | 438 ----------------------------------------
 drivers/perf/arm_pmu_platform.c |  62 +++++-
 drivers/perf/arm_pmuv3.c        |   5 +-
 include/linux/cpuhotplug.h      |   1 -
 include/linux/fwnode.h          |   5 +
 include/linux/perf/arm_pmu.h    |  12 +-
 include/linux/property.h        |   6 +
 20 files changed, 552 insertions(+), 477 deletions(-)
---
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
change-id: 20261109-acpi_arm_pmu_registration_hmp-6c595cf0d8de

Best regards,
-- 
Leo Yan <leo.yan@arm.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-11-16 18:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 18:21 [PATCH 0/8] ACPI: arm64: Support PMU on Heterogeneous Systems Leo Yan
2026-11-16 18:21 ` [PATCH 1/8] device property: Add firmware node IRQ affinity callbacks Leo Yan
2026-11-16 18:21 ` [PATCH 2/8] device property: Add software-node IRQ affinity masks Leo Yan
2026-11-16 18:21 ` [PATCH 3/8] perf/arm_pmu: Register ACPI SPE and TRBE devices with software nodes Leo Yan
2026-11-16 18:38   ` sashiko-bot
2026-11-16 18:21 ` [PATCH 4/8] perf/arm_pmu: Prepare ACPI registration for per-CPU interrupts Leo Yan
2026-11-16 18:21 ` [PATCH 5/8] perf/arm_pmu: Register ACPI CPU PMUs as platform devices Leo Yan
2026-11-16 18:21 ` [PATCH 6/8] perf/arm_pmu: Support ACPI devices in the platform probe Leo Yan
2026-11-16 18:21 ` [PATCH 7/8] perf/arm_pmu: Use ACPI CPU affinity in IRQ handling Leo Yan
2026-11-16 18:21 ` [PATCH 8/8] ACPI: arm64: Move PMU device registration to drivers/acpi/arm64/ Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox