Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636122

RE: [PATCH V3] cpuidle: check dev before usage in cpuidle_use_deepest_state

From "Li, Fei" <fei.li@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH V3] cpuidle: check dev before usage in cpuidle_use_deepest_state
Date 2017-05-05 04:00 +0200
Message-ID <tDAHf-3e8-11@gated-at.bofh.it> (permalink)
References <tDkVQ-1oS-23@gated-at.bofh.it> <tDm1z-24V-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3] cpuidle: check dev before usage in  cpuidle_use_deepest_state "Li, Fei" <fei.li@intel.com> - 2017-05-04 11:10 +0200
  Re: [PATCH V3] cpuidle: check dev before usage in  cpuidle_use_deepest_state Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-05-04 12:20 +0200
    RE: [PATCH V3] cpuidle: check dev before usage in  cpuidle_use_deepest_state "Li, Fei" <fei.li@intel.com> - 2017-05-05 04:00 +0200
  Re: [PATCH V3] cpuidle: check dev before usage in cpuidle_use_deepest_state "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-05-05 23:40 +0200
    Re: [PATCH V3] cpuidle: check dev before usage in cpuidle_use_deepest_state Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-06 00:30 +0200
      RE: [PATCH V3] cpuidle: check dev before usage in  cpuidle_use_deepest_state "Li, Fei" <fei.li@intel.com> - 2017-05-08 03:00 +0200

csiph-web