lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] cpufreq: cpufreq-cpu0: do not allow transitions with regulators suspended
On 11/13/2013 07:25 PM, viresh kumar wrote:
> On Wednesday 13 November 2013 08:46 PM, Nishanth Menon wrote:
>> arrgh, my bad.. Apologies for the bad one.. I missed it :( Does the following
>> look equivalent?
>
> yes.
>
>> With this, I now see:
>
>> [ 43.212714] cpufreq: cpufreq_add_policy_cpu: Failed to stop governor
>> ^^^ ??
>
> Ahh, I missed this part. I thought it will fail at some other place where there
> is no error checking :), but that's not true.
>
> Following should fix it for you and looks to be the right way as well.
>
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index dc67fa0..30b09d3 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1530,6 +1530,14 @@ static void cpufreq_bp_resume(void)
> }
> }
>
> + if (has_target()) {
> + if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
> + (ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
> + pr_err("%s: Failed to start governor\n", __func__);
> + goto fail;
> + }
> + }
> +
> schedule_work(&policy->update);
>
> fail:
>
I am guessing this is a little too early for restarting policy here
considering syscore_ops->resume is pretty early..

http://pastebin.mozilla.org/3602746 is the equivalent patch for v3.12
http://pastebin.mozilla.org/3602747 is the result.

--
Regards,
Nishanth Menon


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