Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch omits the actual sysfs string definitions and array entries for BCM2712 CPU L2 events (bus 14) and all BCM2712 Master ID Filtered events, despite adding block comments explicitly advertising them.
--
--- Patch [3]: [PATCH v12 3/3] perf: Add Raspberry Pi 5 (BCM2712) AXI PMU support ---
commit 98bc0717543a8bd621987519c302f6eacbe4544d
Author: Ian Rogers <[email protected]>
perf: Add Raspberry Pi 5 (BCM2712) AXI PMU support
This commit introduces native MMIO-based AXI Performance Counters support
for the BCM2712 architecture (Raspberry Pi 5). It bypasses the legacy VPU
Mailbox IPC layer and defines the mapping arrays for the new endpoints.
> diff --git a/drivers/perf/rpi_axi_pmu.c b/drivers/perf/rpi_axi_pmu.c
> index eda831d66056f..a7e832df49d39 100644
> --- a/drivers/perf/rpi_axi_pmu.c
> +++ b/drivers/perf/rpi_axi_pmu.c
[ ... ]
> +PMU_EVENT_ATTR_STRING(cpu_uc_wtrans.scale, rpi_axi_pmu_event_bcm2712_cpu_uc_wtrans_scale,
> + "32");
> +PMU_EVENT_ATTR_STRING(cpu_uc_wtrans.unit, rpi_axi_pmu_event_bcm2712_cpu_uc_wtrans_unit,
> + "Bytes");
> +
> +/* BCM2712 Master ID Filtered Events */
> +
> -static struct attribute *rpi_axi_pmu_events_attrs[] = {
> - /* System Monitor events */
> +static struct attribute *rpi_axi_pmu_bcm2835_events[] = {
[Severity: Medium]
Are the actual sysfs string definitions for the BCM2712 Master ID filtered
events and CPU L2 events (bus 14) missing here? The block comment advertises
the Master ID filtered events, but the code immediately transitions into the
rpi_axi_pmu_bcm2835_events array. Without these definitions, they will not
be exported for use by the perf tool.
[ ... ]
> + &rpi_axi_pmu_event_bcm2712_cpu_uc_rtrans.attr.attr,
> + &rpi_axi_pmu_event_bcm2712_cpu_uc_rtrans_scale.attr.attr,
> + &rpi_axi_pmu_event_bcm2712_cpu_uc_rtrans_unit.attr.attr,
> + &rpi_axi_pmu_event_bcm2712_cpu_uc_wtrans.attr.attr,
> + &rpi_axi_pmu_event_bcm2712_cpu_uc_wtrans_scale.attr.attr,
> + &rpi_axi_pmu_event_bcm2712_cpu_uc_wtrans_unit.attr.attr,
> + NULL,
> +};
[Severity: Medium]
Does the rpi_axi_pmu_bcm2712_events pointer array end prematurely? It appears
to stop after configuring the cpu_uc events (bus 13) and entirely lacks
pointers for the CPU L2 (bus 14) and Master ID filtered features, meaning they
won't be exposed via sysfs.
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.