lkml.org 
[lkml]   [2017]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V3] cpuidle: check dev before usage in cpuidle_use_deepest_state
Date
On Thursday, May 4, 2017 6:16 PM Daniel Lezcano wrote:
> >
> > preempt_disable();
> > dev = cpuidle_get_device();
> > - dev->use_deepest_state = enable;
> > + if (dev)
> > + dev->use_deepest_state = enable;
>
>
> This change is acceptable as a hot fix but the question is 'why is this
> function called if there is no cpuidle driver registered?'

It's called as below:
clamp_idle_injection_func
-> play_idle
-> cpuidle_use_deepest_state
In play_idle, if no cpuidle driver registered, cpu_idle_poll can be called.
It seems to go too far if not calling play_idle in case of no cpuidle driver
registered.
At present no other suitable and simple fix seen.

>
> > preempt_enable();
> > }
> >
> > --
> > 1.9.1
> >
> > Best Regards,
> > Fei
>
> --
>
> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog

Best Regards,
Fei
\
 
 \ /
  Last update: 2017-05-05 03:53    [W:6.662 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site