Messages in this thread Patch in this message | | | Date | Fri, 20 Sep 2013 14:19:18 +0530 | Subject | Re: Regression on cpufreq in v3.12-rc1 | From | Viresh Kumar <> |
| |
On 20 September 2013 14:11, Linus Walleij <linus.walleij@linaro.org> wrote: > Any other idea why this patch is causing the issue?
I went into looking that patch in more detail after my first reply, not as if I ran away from answering that :)
Probably yes.. I know what's causing it:
unsigned int cpufreq_get(unsigned int cpu) { unsigned int ret_freq = 0; - struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
- if (!policy) - goto out; + if (!down_read_trylock(&cpufreq_rwsem)) + return 0;
if (unlikely(lock_policy_rwsem_read(cpu))) goto out_policy; @@ -1438,8 +1413,8 @@ unsigned int cpufreq_get(unsigned int cpu) unlock_policy_rwsem_read(cpu);
out_policy: - cpufreq_cpu_put(policy); -out: + up_read(&cpufreq_rwsem); + return ret_freq; }
---------x---------------x-------------- We used to return early in case policy isn't found, but now we went and took the lock..
Hmm... Remember I told you last time that I have another way of fixing it up, probably we need that now..
I wanted to add another variable to reflect if a cpufreq_driver is registered or not, and if not then return early from these routines..
I will get that in now, please see if you can give it a try..
But I am still surprised how are we reaching this place before your cpufreq driver gets registered..
| |