Re: [PATCH] clockevents: don't suspend/resume if unused

From: Russell King - ARM Linux
Date: Fri Jan 16 2015 - 06:20:48 EST


On Fri, Jan 16, 2015 at 11:17:06AM +0000, Russell King - ARM Linux wrote:
> On Fri, Jan 16, 2015 at 10:20:14AM +0100, Sylvain Rochet wrote:
> > Hello Alexandre,
> >
> >
> > On Fri, Jan 16, 2015 at 10:05:51AM +0100, Alexandre Belloni wrote:
> > > There is no point in calling suspend/resume for unused
> > > clockevents as they are already stopped and disabled.
> > >
> > > Furthermore, it can take some time to wait for some IPs to stop counting.
> > >
> > > Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx>
> > > Reported-by: Sylvain Rochet <sylvain.rochet@xxxxxxxxxxxx>
> >
> > Indeed, this is way better from what I did.
> >
> >
> > > + if (dev->suspend && dev->mode != CLOCK_EVT_MODE_UNUSED)
> >
> > I wonder if we should use > CLOCK_EVT_MODE_SHUTDOWN
> > (or CLOCK_EVT_MODE_UNUSED || CLOCK_EVT_MODE_SHUTDOWN) instead of
> > !CLOCK_EVT_MODE_UNUSED.
>
> Definitely - consider the effect of the original patch set on a clock
> source which is being used, has PM support, but does not have an
> ->enable callback.

Damn it, that comment should've been on the clocksource patches...

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/