Skip to contentSkip to conversation

cpufreq issue

DISCUSSION Benjamin Herrenschmidt 1 participant 1 message Mar 29, 2005

lore
Share & tools
lore
#0 lore raw

Hi !

I'm trying to solve a long standing cpufreq issue on pmac. That includes adding a suspend() callback in addition to the restore one, but that also includes the need for me to switch to high speed on suspend. The problem is that at this point, IRQs are disabled, which mean that calling the notifier will BUG()... However, I must trigger the jiffies adjustement...

What do you suggest ? Maybe I could have the core cpufreq suspend() routine do a bit like resume(), and so right after it calls my driver suspend(), compare the frequency with get() (if any) and update the jiffies ? Or what ? The problem is that I need to make sure the machine is in high speed before sleep for various HW reasons, and I must make sure the jiffies are recalculated properly since some low level stuff will rely on udelay() beeing "good enough" before cpufreq gets a chance to resume and thus "fixup" the loops_per_jiffies ...

Ben.