Getting zeros on i.MX6 PMU counters using Device Tree Kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting zeros on i.MX6 PMU counters using Device Tree Kernel

642 Views
rathben
Contributor III

I'm having the exact problem that was nicely described in an earlier post regarding pre-DT kernels: Getting zeros on i.MX6 PMU counters

My kernel is 3.10.17. I can "fix" this by somewhat blindly pasting the suggested assembly snippet into the cpu_pmu_device_probe function in arch/arm/kernel/perf_event_cpu.c:

u32 val = 0b11;
asm volatile("mcr p15, 0, %0, c1, c1, 1" : : "r" (val));

I'm hoping that there is a more elegant way of doing this. Device tree item perhaps? Has anyone else run into this problem?

Labels (1)
0 Kudos
1 Reply

389 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

After checking the problem it seems that the solution shown in the discussion you mentioned.

I doubt there is a solution that can be performed from the DTS, the dts is only for configuration description but I did not find anything for the PMU.  I suggest you to stikc with this solution,

Getting zeros on i.MX6 PMU counters

Best Regards,

Alejandro

0 Kudos