Skip to content Skip to sidebar Skip to footer

How To Run Code On Every Cpu

I am trying to set the Performance Monitor User Mode Enable register on all cpus on a Nexus 4 running a mako kernel. Right now I am setting the registers in a loadable module:

Solution 1:

You don't need to run the code on every cpu right now. What you need to do is arrange so that when the offline cpus come back online, your code is able to execute and enable the access to the PMU.

One way to achieve that would be with a cpu hotplug notifier.

Post a Comment for "How To Run Code On Every Cpu"