s-matyukevich/raspberry-pi-os

PMU is periodically disabled

Closed this issue · 1 comments

Hello,

Case is based on another platform, OrangePi 5+ w/ Rockchip RK3588 processor, but it should be same arm v8.

Within an out of tree kernel module, a timer is reading one of the event counter. For instance, counter number 0.

After the first period of one second, I've noticed that counter is reading zero whereas previous loop it was valued with any instruction retired event.

At first I had suspected a counter overflow and tried to handle it; but traces of all PM registers, especially pmcr_el0 revealed that PMU has been disabled on my driver behalf.

I have rebuild kernel without PERF where I found its IRQ handler doing some PMU restart to manage Overflows.
But even without that code, PMU is still disabled.

I can't tell if a board firmware is also doing that but PEs are handled by kernel code.

Did you face that case ?
Is your Pi PMU reprogrammed by unexpected kernel code ?

Thanks for any help,
Regards
Cyril

Closing the issue as I found some hints to the problem