lkml.org 
[lkml]   [2013]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH] cpufreq: cpufreq-cpu0: do not allow transitions with regulators suspended
From
On 14 November 2013 22:34, Nishanth Menon <nm@ti.com> wrote:
> I think it is still too early to do so :(

:)

> equivalent patch: http://pastebin.mozilla.org/3603467 (with minor
> changes for build)
>
> Basic tests: http://pastebin.mozilla.org/3603456 (governor is
> functional, but governor kicks in early before i2c is resumed)
>
> With call stack: http://pastebin.mozilla.org/3603455 to highlight call
> sequences
>
> Seems like we might want to pause governor as early in the suspend
> sequence as possible to allow SoC and regulator stuff to suspend
> themselves without cpufreq interfering.. just my 2 cents..

You made me spend a day on this :)
It wasn't a day's job really but I got into a really hard to crack bug with my
patch, I was calling __cpufreq_governor() from under write_lock_irqsave
for cpufreq_driver_lock. And __cpufreq_governor() had:

read_lock_irqsave(&cpufreq_driver_lock, flags);

I wasn't able to suspend my system: ARM, X86.. It simply stopped
printing anything and I didn't had a clue of what's going on.. Hacked
everything possible, even kernel/power/suspend.c to return early
(yeah I used freezer > pm_test as well, but I wanted to return before
freezing userspace)...

Then somehow I got to know that this is the wrong piece of code :)

But probably I have a solution now to which you can't say:

"I think it is still too early to do so :("

:)

Give it a try and give a Tested-by please :)


\
 
 \ /
  Last update: 2013-11-15 11:41    [W:0.078 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site