Skip to contentSkip to conversation

perf: Add Raspberry Pi AXI PMU driver

PATCH Superseded Ian Rogers 3 participants 8 messages Oct 2 – Oct 4

Subsystems (4)

v14 of 19 Superseded Latest is v19 →

lore
Share & tools
lore

Ian Rogers

author
#0 lore raw

v14 cover perf: Add Raspberry Pi AXI PMU driver

Motivation & Background
==============================
Currently, Linux lacks a standard perf-API compatible driver for the Broadcom AXI performance counter blocks on Raspberry Pi platforms. Prior out-of-tree vendor solutions relied on custom debugfs nodes and ad-hoc kthreads, preventing integration with standard Linux perf tooling (perf stat, perf list, etc.).

This driver implements standard struct pmu hardware uncore callbacks under drivers/perf/, exposing human-readable sysfs event aliases for all 11 hardware metrics per bus (atwait, atrans, amax, wwait, wtrans, wmax, rwait, rtrans, rmax, rpend, ratrans) and 6-bit AXI master ID filtering (filter=0..50) directly to user space.

Key Architectural Improvements & Features
==============================
1. Standard Linux Perf Integration:
- Exposes uncore AXI interconnect events via

     `/sys/bus/event_source/devices/rpi_axi_pmu/`.

- Supports up to 3 concurrently monitored buses per monitor (NUM_BUS_WATCHER_RESULTS = 3), with bus-watcher reference counting so all 11 counter metrics on the same (monitor, bus, filter) tuple share a single hardware watcher without multiplexing.
- Enforces atomic group validation (rpi_axi_pmu__validate_group) to reject event groups requiring more than 3 watchers per monitor at perf_event_open() time, while supporting time-multiplexing across more than 3 ungrouped buses.
- Supports hardware counter accumulation (local64_add) using full 32-bit unsigned counter reads (u32) and periodic hrtimer polling (POLL_INTERVAL_MS = 100) to prevent counter saturation.

2. CPU Hotplug Support (cpuhp):
- Registers dynamic CPU hotplug callbacks (CPUHP_AP_ONLINE_DYN via

     `cpuhp_state_add_instance()`).

- Automatically migrates PMU context (perf_pmu_migrate_context) to an online CPU core when the designated CPU goes offline.

3. Hybrid Memory-Mapped & Mailbox Work Queue Architecture:
- System Monitor (MMIO): Performs fast atomic-safe memory reads directly mapped over ARM physical memory space (MON__SYSTEM).
- VPU Monitor (Mailbox IPC): For Broadcom BCM2835-BCM2711 platforms (RPi 1-4) when configured via system-only, VideoCore VPU monitor (MON__VPU) mailbox IPC calls are offloaded to process context via schedule_work(&pmu->mailbox_work) and serialized with an atomic snapshot cache (cached_values), avoiding sleeping in atomic/hrtimer context. The firmware node is discovered via of_find_compatible_node(NULL, NULL, "raspberrypi,bcm2835-firmware") and untranslated VideoCore bus addresses are read from the reg property via of_property_read_u32_index().

4. Per-SoC Generation Support:
- Patch 1 documents the Device Tree bindings (brcm,bcm2835-axiperf,

     `brcm,bcm2711-axiperf`, `brcm,bcm2712-axiperf`).

- Patch 2 adds core driver support for Broadcom BCM2835 and BCM2711 with distinct per-SoC bus and AXI master ID filter tables matching the hardware topology of each generation.
- Patch 3 expands support for Broadcom BCM2712 (Raspberry Pi 5), adding the BCM2712 System monitor pipelines (DISPLAY_TOP, ARGON_TOP, BSTM_TOP, PCIE_01, XPT, ARM, SYSTEM_L2, etc.) and 6-bit AXI master ID filter tables (51 filter IDs, GENMASK(13, 8)).

Hardware Validation
==============================
The driver has been validated on Raspberry Pi 400 (BCM2711) and Raspberry Pi 5 (BCM2712). Example on Raspberry Pi 5 monitoring 17 events across 3 buses (bstm_top, arm, system_l2) simultaneously without multiplexing:

  $ sudo perf stat -a \
      -e rpi_axi_pmu/bstm_top_atwait/,rpi_axi_pmu/bstm_top_atrans/,rpi_axi_pmu/bstm_top_amax/ \
      -e rpi_axi_pmu/bstm_top_wwait/,rpi_axi_pmu/bstm_top_wtrans/,rpi_axi_pmu/bstm_top_wmax/ \
      -e rpi_axi_pmu/bstm_top_rwait/,rpi_axi_pmu/bstm_top_rtrans/,rpi_axi_pmu/bstm_top_rmax/ \
      -e rpi_axi_pmu/bstm_top_rpend/,rpi_axi_pmu/bstm_top_ratrans/ \
      -e rpi_axi_pmu/arm_rtrans/,rpi_axi_pmu/arm_wtrans/,rpi_axi_pmu/arm_rmax/,rpi_axi_pmu/arm_wmax/ \
      -e rpi_axi_pmu/system_l2_rtrans/,rpi_axi_pmu/system_l2_wtrans/ \
      -- python3 -c 'a = bytearray(256 * 1024 * 1024); b = bytearray(a)'

Performance counter stats for 'system wide':

                   0      rpi_axi_pmu/bstm_top_atwait/
                  64      rpi_axi_pmu/bstm_top_atrans/
                   0      rpi_axi_pmu/bstm_top_amax/
                   0      rpi_axi_pmu/bstm_top_wwait/
                   0      rpi_axi_pmu/bstm_top_wtrans/
                   0      rpi_axi_pmu/bstm_top_wmax/
                   0      rpi_axi_pmu/bstm_top_rwait/
                 256      rpi_axi_pmu/bstm_top_rtrans/
                   0      rpi_axi_pmu/bstm_top_rmax/
                 190      rpi_axi_pmu/bstm_top_rpend/
                  64      rpi_axi_pmu/bstm_top_ratrans/
          10,987,780      rpi_axi_pmu/arm_rtrans/
          17,265,030      rpi_axi_pmu/arm_wtrans/
               2,519      rpi_axi_pmu/arm_rmax/
               1,093      rpi_axi_pmu/arm_wmax/
                   0      rpi_axi_pmu/system_l2_rtrans/
                   0      rpi_axi_pmu/system_l2_wtrans/
         0.165352897 seconds time elapsed

Additionally verified on Raspberry Pi 5:
- 6-bit AXI master ID filtering (filter=0..50 accepted, with active traffic on filter=16..23 and filter=32..43 confirming bit 5 is decoded in BCM2712 hardware, and filter=51 rejected with -EINVAL).
- Time-multiplexing across all 13 BCM2712 buses and atomic group rejection (-EINVAL) when grouping 4 distinct buses.
- Live CPU hotplug context migration when offlining CPU0.

Changes since v13
==============================
Addresses feedback from the upstream v13 review as well as downstream review on https://github.com/raspberrypi/linux/pull/7571 (with the corresponding updates tracked in
https://github.com/raspberrypi/linux/pull/7671):

- Device Tree Bindings (Patch 1):
- Removed the firmware phandle property and allOf conditional from brcm,bcm2835-axiperf.yaml per Krzysztof Kozlowski's review; the driver now locates raspberrypi,bcm2835-firmware via of_find_compatible_node().
- Set reg minItems: 2 (MON_SYSTEM and MON_VPU) and updated the

    example to use the BCM2712 address map (`0x7c012800` / `0x7e000000`).

- Core Driver & SoC Support (Patches 2 & 3):
- Removed all LINUX_VERSION_CODE conditional checks per Uwe Kleine-König and Florian Fainelli.
- Separated BCM2835, BCM2711, and BCM2712 bus and AXI master ID filter tables (CHIP_BCM2835, CHIP_BCM2711, CHIP_BCM2712) to match the hardware definitions per https://github.com/raspberrypi/linux/pull/7571.
- Fixed VPU mailbox base address lookup to read untranslated 32-bit VideoCore peripheral addresses via of_property_read_u32_index() instead of CPU-translated platform_get_resource() addresses, and skipped mapping MON_VPU on BCM2712 (CHIP_BCM2712).
- Widened the AXI master ID filter field from 5 bits to 6 bits (GENMASK(13, 8) in hardware, config:10-15 in perf attr) to support all 51 BCM2712 filter IDs without truncation.
- Replaced 31-bit counter masking (& 0x7FFFFFFF) with full 32-bit unsigned reads (u32) and removed speculative scale="32" / unit="Bytes" sysfs attributes so raw transaction, cycle, and latency counts are reported accurately.
- Added bus-watcher reference counting and rpi_axi_pmu__validate_group() so multiple metrics on the same (monitor, bus, filter) share a single hardware watcher and unschedulable event groups fail at perf_event_open() with -EINVAL.
- Switched CPU hotplug registration to exported cpuhp_state_add_instance() with an online callback (rpi_axi_pmu_online_cpu) and updated cpumask_show() to use sysfs_emit().
- Fixed Kconfig dependencies (ARCH_BCM2835, RASPBERRYPI_FIRMWARE,

    and `!RPI_AXIPERF`).

Ian Rogers (3):
dt-bindings: perf: Add Broadcom Raspberry Pi AXI PMU definition
perf: Add Raspberry Pi BCM2835 AXI PMU driver
perf: Add Raspberry Pi 5 (BCM2712) AXI PMU support

 .../bindings/perf/brcm,bcm2835-axiperf.yaml   |   71 +
 drivers/perf/Kconfig                          |   13 +
 drivers/perf/Makefile                         |    1 +
 drivers/perf/rpi_axi_pmu.c                    | 3397 +++++++++++++++++
 4 files changed, 3482 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml
 create mode 100644 drivers/perf/rpi_axi_pmu.c
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog
author
#1 lore raw

PATCH v14 1/3 dt-bindings: perf: Add Broadcom Raspberry Pi AXI PMU definition

Add device tree bindings for the Broadcom Raspberry Pi AXI PMU block found on BCM2835, BCM2711, and BCM2712 SoCs.

Depending on the SoC and security configuration, these PMUs support either direct MMIO access for the System monitor or routing via the Raspberry Pi firmware mailbox IPC for the VideoCore VPU monitor.

---
 .../bindings/perf/brcm,bcm2835-axiperf.yaml   | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +71 -0
new file mode 100644
index 000000000000..fcffa5fc6c02
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/perf/brcm,bcm2835-axiperf.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835/2711/2712 AXI Performance Monitor
+
+maintainers:
+  - Ian Rogers <[email protected]>
+  - Raspberry Pi Kernel Maintenance <[email protected]>
+
+description: |
+  The Broadcom BCM2835 series (including BCM2711 and BCM2712) features hardware
+  performance monitors on the AXI bus for evaluating memory bandwidth and
+  system traffic. Depending on the SoC architecture, multiple monitors exist.
+  The primary monitor evaluates the System fabric, while the secondary monitor
+  evaluates the VideoCore VPU hardware.
+
+  Older silicon generally restricts direct MMIO access to the VPU endpoints,
+  requiring them to be accessed over the Raspberry Pi firmware mailbox
+  interface. If the VPU endpoints are memory-mapped, they are supplied as
+  secondary resources.
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-axiperf
+      - brcm,bcm2711-axiperf
+      - brcm,bcm2712-axiperf
+
+  reg:
+    minItems: 1
+    items:
+      - description: System monitor MMIO surface
+      - description: VPU monitor MMIO surface
+    description: |
+      Memory-mapped I/O resource regions for the AXI PMU endpoints.
+      Typically ordered as System monitor, followed by VPU monitor if directly
+      mapped.
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - brcm,bcm2712-axiperf
+    then:
+      properties:
+        reg:
+          maxItems: 1
+
+additionalProperties: false
+
+examples:
+  - |
+    pmu@7e009800 {
+        compatible = "brcm,bcm2835-axiperf";
+        reg = <0x7e009800 0x100>,
+              <0x7ee08000 0x100>;
+    };
+  - |
+    pmu@7c012800 {
+        compatible = "brcm,bcm2712-axiperf";
+        reg = <0x7c012800 0x100>;
+    };
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog
#2 lore raw

Re: [PATCH v14 1/3] dt-bindings: perf: Add Broadcom Raspberry Pi AXI PMU definition

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 8 lines

Add device tree bindings for the Broadcom Raspberry Pi AXI PMU block found on BCM2835, BCM2711, and BCM2712 SoCs.

Depending on the SoC and security configuration, these PMUs support either direct MMIO access for the System monitor or routing via the Raspberry Pi firmware mailbox IPC for the VideoCore VPU monitor.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH v14 1/3] dt-bindings: perf: Add Broadcom Raspberry Pi AXI PMU definition

In reply to Ian Rogers
Quoted 9 lines · Ian Rogers

Add device tree bindings for the Broadcom Raspberry Pi AXI PMU block found on BCM2835, BCM2711, and BCM2712 SoCs.

Depending on the SoC and security configuration, these PMUs support either direct MMIO access for the System monitor or routing via the Raspberry Pi firmware mailbox IPC for the VideoCore VPU monitor.

---

I could not find lore links in your cover letter, changelog is cut (only v13), so probably we are repeating. Please start using b4 if providing entire changelog with links is too difficult.

Quoted 11 lines
 .../bindings/perf/brcm,bcm2835-axiperf.yaml   | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +1 -0
new file mode 100644
index 000000000000..fcffa5fc6c02
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml line 11

Quoted 10 lines
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +10 -0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/perf/brcm,bcm2835-axiperf.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835/2711/2712 AXI Performance Monitor
+
+maintainers:
+  - Ian Rogers <[email protected]>
+  - Raspberry Pi Kernel Maintenance <[email protected]>

Drop

Quoted 8 lines
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +8 -0
+
+description: |
+  The Broadcom BCM2835 series (including BCM2711 and BCM2712) features hardware
+  performance monitors on the AXI bus for evaluating memory bandwidth and
+  system traffic. Depending on the SoC architecture, multiple monitors exist.
+  The primary monitor evaluates the System fabric, while the secondary monitor
+  evaluates the VideoCore VPU hardware.
+

Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +10 -0
+  Older silicon generally restricts direct MMIO access to the VPU endpoints,
+  requiring them to be accessed over the Raspberry Pi firmware mailbox
+  interface. If the VPU endpoints are memory-mapped, they are supplied as
+  secondary resources.
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-axiperf
+      - brcm,bcm2711-axiperf

Why random order? Keep the list properly sorted by name.

Quoted 17 lines
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +17 -0
+      - brcm,bcm2712-axiperf
+
+  reg:
+    minItems: 1
+    items:
+      - description: System monitor MMIO surface
+      - description: VPU monitor MMIO surface
+    description: |
+      Memory-mapped I/O resource regions for the AXI PMU endpoints.
+      Typically ordered as System monitor, followed by VPU monitor if directly
+      mapped.
+
+required:
+  - compatible
+  - reg
+
+allOf:

Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml line 56

Quoted 10 lines
Documentation/devicetree/bindings/perf/brcm,bcm2835-axiperf.yaml new file +10 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - brcm,bcm2712-axiperf
+    then:
+      properties:
+        reg:
+          maxItems: 1

Why brcm,bcm2835-axiperf has flexible number of addresses?

Best regards,
Krzysztof

author
#4 lore raw

PATCH v14 2/3 perf: Add Raspberry Pi BCM2835 AXI PMU driver

In reply to Ian Rogers

Add a PMU driver for the Raspberry Pi AXI performance monitors. It provides access to the System and VideoCore performance counters on Broadcom BCM2835 and BCM2711 platforms natively through the perf subsystem.

The driver implements bus-watcher refcounting, group validation, CPU hotplug migration, and sysfs event aliases mapping hardware-specific events to AXI pipelines (such as DMA, V3D, HVS, and ISP). Memory-mapped endpoints for the primary System bus are read synchronously, while the VideoCore VPU monitor is polled asynchronously in process context via the Raspberry Pi firmware mailbox interface.

---
 drivers/perf/Kconfig       |   13 +
 drivers/perf/Makefile      |    1 +
 drivers/perf/rpi_axi_pmu.c | 2931 ++++++++++++++++++++++++++++++++++++
 3 files changed, 2945 insertions(+)
 create mode 100644 drivers/perf/rpi_axi_pmu.c
drivers/perf/Kconfig +13 -0
index 245e7bb763b9..0ead13195a57 100644
@@ -325,4 +325,17 @@ config NVIDIA_TEGRA410_C2C_PMU
 	  Enable perf support for counters in NVIDIA C2C interface of NVIDIA
 	  Tegra410 SoC.
 
+config RPI_AXI_PMU
+	tristate "Raspberry Pi AXI Performance Monitor"
+	depends on ARCH_BCM2835 || COMPILE_TEST
+	depends on !RPI_AXIPERF
+	depends on RASPBERRYPI_FIRMWARE || RASPBERRYPI_FIRMWARE=n
+	help
+	  Enable support for the Raspberry Pi AXI Performance Monitor.
+	  This provides access to the System and VideoCore performance
+	  counters on Broadcom BCM2835 and BCM2711 platforms.
+
+	  Expect 100ms ping latencies to the VideoCore firmware mailbox
+	  when reading counters on these platforms.
+
 endmenu
drivers/perf/Makefile +1 -0
index eb8a022dad9a..b9c98deb4379 100644
@@ -37,3 +37,4 @@ obj-$(CONFIG_MESON_DDR_PMU) += amlogic/
 obj-$(CONFIG_CXL_PMU) += cxl_pmu.o
 obj-$(CONFIG_NVIDIA_TEGRA410_CMEM_LATENCY_PMU) += nvidia_t410_cmem_latency_pmu.o
 obj-$(CONFIG_NVIDIA_TEGRA410_C2C_PMU) += nvidia_t410_c2c_pmu.o
+obj-$(CONFIG_RPI_AXI_PMU) += rpi_axi_pmu.o
drivers/perf/rpi_axi_pmu.c new file +2931 -0

2,931 lines not on this page · raw message

Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog
#5 lore raw

Re: [PATCH v14 2/3] perf: Add Raspberry Pi BCM2835 AXI PMU driver

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] perf/rpi_axi_pmu: Endianness bug in VPU mailbox IPC payloads --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] perf/rpi_axi_pmu: Endianness bug in VPU mailbox IPC payloads
--

commit 5a995c8809331bd8433a8a216b6077dd563f9f07
Author: Ian Rogers <[email protected]>

perf: Add Raspberry Pi BCM2835 AXI PMU driver

Adds a PMU driver for the Raspberry Pi AXI performance monitors, providing access to the System and VideoCore performance counters natively through the perf subsystem on Broadcom BCM2835 and BCM2711 platforms.

Quoted 4 lines
drivers/perf/rpi_axi_pmu.c new file +0 -0
new file mode 100644

[ ... ]

drivers/perf/rpi_axi_pmu.c line 2136

Quoted 4 lines
drivers/perf/rpi_axi_pmu.c new file +4 -0
+static void set_monitor_control(struct rpi_axi_pmu *pmu, enum monitor mon, u32 set)
+{
+	if (pmu->monitor[mon].use_mailbox_interface) {
+		u32 tmp[3] = {pmu->monitor[mon].mailbox + GEN_CTRL, 1, set};

[Severity: Medium]
Will this payload work correctly on big-endian architectures?

The VPU mailbox communication appears to use native u32 arrays for its payloads here without explicit cpu_to_le32() conversions. Does this cause the little-endian VideoCore VPU to read swapped bytes when the driver is compiled for big-endian systems?

Quoted 1 line
drivers/perf/rpi_axi_pmu.c new file +1 -0
+		int err;

[ ... ]

drivers/perf/rpi_axi_pmu.c line 2171

Quoted 6 lines
drivers/perf/rpi_axi_pmu.c new file +6 -0
+static void set_bus_watcher_control(struct rpi_axi_pmu *pmu, enum monitor mon, int idx, u32 set)
+{
+	int watcher = watcher_offset(idx);
+
+	if (pmu->monitor[mon].use_mailbox_interface) {
+		u32 tmp[3] = {pmu->monitor[mon].mailbox + watcher, 1, set};

[Severity: Medium]
Similarly, does this watcher configuration payload require endianness conversions to prevent hardware communication failures on big-endian systems?

Quoted 1 line
drivers/perf/rpi_axi_pmu.c new file +1 -0
+		int err;

[ ... ]

Quoted 19 lines
drivers/perf/rpi_axi_pmu.c new file +19 -0
+static u32 rpi_axi_pmu_read_counter(struct rpi_axi_pmu *pmu, enum monitor mon, int idx,
+				    enum counter counter)
+{
+	int watcher = watcher_offset(idx);
+	int offset = counter_offset(counter);
+	u32 ret;
+	/* Use READ_ONCE to prevent KCSAN data race warnings during lockless IPC reads */
+	if (!READ_ONCE(pmu->monitor[mon].hw_events.enabled[idx]))
+		return 0;
+	if (pmu->monitor[mon].use_mailbox_interface) {
+		u32 tmp[3] = {
+			pmu->monitor[mon].mailbox + watcher + offset,
+			1, -1
+		};
+		int err;
+
+		might_sleep();
+		lockdep_assert_held(&pmu->vpu_mutex);
+		if (WARN_ON_ONCE(in_interrupt() || irqs_disabled()))

drivers/perf/rpi_axi_pmu.c line 2284

Quoted 10 lines
drivers/perf/rpi_axi_pmu.c new file +10 -0
+			return -1;
+		err = rpi_firmware_property(pmu->firmware,
+					    RPI_FIRMWARE_GET_PERIPH_REG,
+					    tmp, sizeof(tmp));
+		if (err < 0 || tmp[1] != 1) {
+			dev_err_ratelimited(&pmu->pdev->dev, "Failed to read bus watcher\n");
+			/* Return U32_MAX on IPC failure. */
+			return U32_MAX;
+		}
+		ret = tmp[2];

[Severity: Medium]
When the read response is received, is a le32_to_cpu() conversion needed on tmp[2] before it is consumed?

Using proper endianness conversions would align with other Broadcom firmware drivers like clk-raspberrypi to correctly interface with the hardware.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
author
#6 lore raw

PATCH v14 3/3 perf: Add Raspberry Pi 5 (BCM2712) AXI PMU support

In reply to Ian Rogers

Extend the Raspberry Pi AXI PMU driver to support the Broadcom BCM2712 architecture used in the Raspberry Pi 5.

The BCM2712 SoC drops the legacy VideoCore VPU monitor and exposes a unified System monitor via MMIO mapping distinctly different hardware pipelines (such as DISPLAY_TOP, ARGON_TOP, BSTM_TOP, PCIE_01, and XPT) and expanded 6-bit AXI master ID filter tables.

---
 drivers/perf/Kconfig       |   2 +-
 drivers/perf/rpi_axi_pmu.c | 470 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 469 insertions(+), 3 deletions(-)
drivers/perf/Kconfig +1 -1
index 0ead13195a57..af1b2359d234 100644
@@ -333,7 +333,7 @@ config RPI_AXI_PMU
 	help
 	  Enable support for the Raspberry Pi AXI Performance Monitor.
 	  This provides access to the System and VideoCore performance
-	  counters on Broadcom BCM2835 and BCM2711 platforms.
+	  counters on Broadcom BCM2835, BCM2711, and BCM2712 platforms.
 
 	  Expect 100ms ping latencies to the VideoCore firmware mailbox
 	  when reading counters on these platforms.
drivers/perf/rpi_axi_pmu.c +468 -2

545 lines not on this page · raw message

Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog
#7 lore raw

Re: [PATCH v14 3/3] perf: Add Raspberry Pi 5 (BCM2712) AXI PMU support

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 9 lines

Extend the Raspberry Pi AXI PMU driver to support the Broadcom BCM2712 architecture used in the Raspberry Pi 5.

The BCM2712 SoC drops the legacy VideoCore VPU monitor and exposes a unified System monitor via MMIO mapping distinctly different hardware pipelines (such as DISPLAY_TOP, ARGON_TOP, BSTM_TOP, PCIE_01, and XPT) and expanded 6-bit AXI master ID filter tables.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3