On 2 August 2013 12:08, Mike Turquette <mturquette@xxxxxxxxxx> wrote: > Quoting Viresh Kumar (2013-08-01 22:02:37) >> More lists cc'd >> >> On Thu, Aug 1, 2013 at 6:08 PM, Michael Giardino >> <giardino@xxxxxxxxxxxxxx> wrote: >> > Hi, >> > >> > I hope this is the right spot to ask this. >> > >> > Is there any way to change the cpu frequency using the cpufreq driver >> > from within an hrtimer callback function? I encounter a kernel panic >> > at cpufreq.c line 255 (260 in 3.9.5) > > It is not just about the notifiers. > > Performing a clock rate change and voltage regulator transition (DVFS) > is not a short operation on many ARM platforms. Relocking a PLL and > waiting for a regulator to step and stabilize can take well over 100 > milliseconds and some of those functions might sleep. BTW, The routine in question doesn't change frequency by itself. But the caller of this routine will change clk just after/before calling this routine. I don't really know why this code was initially written there, but I don't think we should add such a BUG() or WARN() to satisfy performance of a system. They should be used only when it is not possible to execute the notifier when interrupts are disabled. You have any clue why this code was placed here? -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html