lkml.org 
[lkml]   [2020]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH][v2] PM / s2idle: Clear _TIF_POLLING_NRFLAG before suspend to idle
On Mon, Jun 22, 2020 at 7:16 PM Chen Yu <yu.c.chen@intel.com> wrote:
>
> Hi Rafael,
> On Mon, Jun 22, 2020 at 06:19:35PM +0200, Rafael J. Wysocki wrote:
> [cut]
> > > +{
> > > + if (!current_clr_polling_and_test())
> > > + s2idle_enter(drv, dev, index);
> > > +
> > > + return index;
> >
> > Is the value returned here used at all?
> >
> It is not used for now IMO.
> > > */
> > > index = find_deepest_state(drv, dev, U64_MAX, 0, true);
> > > if (index > 0)
> > > - enter_s2idle_proper(drv, dev, index);
> > > + call_s2idle(drv, dev, index);
> >
> > I'm wondering why this can't be
> >
> > if (index > 0 && !current_clr_polling_and_test())
> > enter_s2idle_proper(drv, dev, index);
> >
> Yes, it should be simpler, but I guess Peter was trying to
> make call_s2idle() consistent with call_cpuidle(),
> and also s2idle_enter() is analogous to cpuidle_enter().

So IMO it would be better to do the simplest fix first and then do the
cleanup on top of it.

Thanks!

\
 
 \ /
  Last update: 2020-06-22 22:02    [W:3.218 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site