Need to reuse cpufreq's recalibration code
Hi,
I am messing with the CPU clocks outside the cpufreq framework (direct ICS manipulation). While I plan to integrate the code into cpufreq, at this time I cannot since all the math is pocket calculator.
What I need to do is recalibrate the CPU clocks after I change the frequency. I observe that the real time clock is correct, but that CPU time is wrongly accounted for and obviously /proc/cpuinfo isn't updated. That happens if I use the TCS, mptmr and hpet.
I figured that the best way to proceed is that I reuse some code from cpufreq, namely cpufreq_notify_transition().
I am looking for advise how to achieve this best without messing up too much other code.
Maybe I can write an "empty" cpufreq implementation that does nothing but call cpufreq_notify_transition when I touch one of it's /proc files?
Platform is x86_64, hardware is Core2 Conroe on D975XBX (975x chipset).
Martin
Signature · 2 lines
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer <[email protected]> http://www.cons.org/cracauer/