Raspberry Pi support for AXI bus events in Linux perf tool - #7571
captain5050 wants to merge 0 commit into
Conversation
d40d995 to
df71446
Compare
|
Thanks for this, I have been keeping an eye on the upstream submission. It looks like there are issues with 2711/2712 paths. Here is a Claude review that can compare things more precisely than I can: Thanks for putting this together — I've read through the whole driver, applied it to a clean SummaryExposing these counters through the perf subsystem is the right idea, and the perf-side plumbing is mostly well built: a proper However, the hardware description is substantially wrong for BCM2711 and BCM2712, and the firmware-mailbox address handling looks broken on BCM2835/2836/2837. The commits carry Blocking1. BCM2711 (Pi 4) is treated as identical to BCM2835The match table maps
This means the example in the PR description is mislabelled. The VPU table has the same problem. Downstream's 2711 VPU list drops 2. The BCM2712 system-bus table does not match the hardware
Every Pi 5 event alias except possibly PCIe therefore reads a different bus from the one its name claims. Notably, The block of 3. The firmware mailbox is given a translated ARM physical addressresource = platform_get_resource(pdev, IORESOURCE_MEM, i);
pmu->monitor[i].mailbox = (u32)resource->start;
of_property_read_u32_index(np, "reg", i * 2, (u32 *)(&state->monitor[i].base_address));because 4. Two platform drivers claim the same three compatibles
This needs either Relatedly, 5. Direct MMIO fallback to the VPU monitor will fault on Pi 1–3If the On BCM2712 the driver ioremaps Significant, but not blocking
Minor
Suggested path forwardThe structural work is worth keeping. What I'd want to see before this can go in:
Given that the tables appear to have been generated rather than sourced, I'd suggest re-deriving everything hardware-facing from the downstream driver or the vendor documentation, rather than spot-checking the current values. |
df71446 to
7e030b6
Compare
Comments from Sashiko and: raspberrypi/linux#7571
Comments from Sashiko and: raspberrypi/linux#7571
Comments from Sashiko and: raspberrypi/linux#7571
Sent to LKML in:
https://lore.kernel.org/linux-perf-users/20260811083828.2057695-1-irogers@google.com/
An example Raspberry Pi 4 use: