PMU Linux support

I have the imx7d with Linux running on it. I want to read the PMU counters, however I can access to them with perf. They do not appear in the perf list.

I have been exploring the device tree and imx7s.dtsi show this:

            pmu {
                    compatible = "arm,cortex-a7-pmu";
                    interrupts = GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH;
                    status = "disabled";

Even if it modified to enabled, Linux still does not detect it. The device tree does not set the address of the PMU. How can I add PMU support for Linux in the imx7d?

Tnak you!!

Which version of the BSP/Kernel are you using?

It seems that the driver arch/arm/kernel/perf_event_v7.c uses co-processor registers to access the PMU. I don’t think that a memory map is required.

Make sure the kernel configuration CONFIG_HW_PERF_EVENTS is enabled (it should be by default).

When just setting status to okay it seems to work here on a Colibri iMX7 Dual 1GB:

# dmesg | grep perf
[    0.470438] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available