[PATCH] INCOMPLETE fix for CM Performance settings only affecting cpu0
There's a long-standing bug (or omission rather) in (probably all) the kernels used for the HTC Sensation--a feature of some Qualcomm CPUs apparently--which is that you can independently set the max cpu frequency of both processor cores. Because of the way the CM Performance settings is written, it only sets cpu0 and expects cpu1 to automatically follow suite. This causes the second core to always run at the kernel's default max setting when the screen is on.
For some time now I've been twiddling with a patch for the kernel that would set cpu1(...n) to follow the changes of cpu0. I have not succeeded, and am now entirely fed up with the whole business and will dump my current results here if anyone is inclined.
I register a CPUFREQ_POLICY_NOTIFIER in the mach-msm/cpufreq.c driver and reading the values works just fine, but when I try to set them the second core seems to bog down and the phone slowly freezes.
Please note that I am not a kernel hacker, and not much familiar with Linux so there probably are glaring mistakes and stupid things in here.
This patch is against arch/arm/mach-msm/cpufreq.c and I was hacking at sources from @android1234567
's repo at https://github.com/sultanxda/sultan-...-bruce-linaro3
Enjoy or something :P