[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1501241746210.5526@nanos>
Date: Sat, 24 Jan 2015 18:07:31 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Xunlei Pang <pang.xunlei@...aro.org>
cc: lkml <linux-kernel@...r.kernel.org>,
"rtc-linux@...glegroups.com" <rtc-linux@...glegroups.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
John Stultz <john.stultz@...aro.org>,
Arnd Bergmann <arnd.bergmann@...aro.org>
Subject: Re: [PATCH v2 3/3] time: clocksource: Add a comment to
CLOCK_SOURCE_SUSPEND_NONSTOP
On Sat, 24 Jan 2015, Xunlei Pang wrote:
> Before this, I tried to add some code to catch such problem at the
> time of registering the clocksource, like using the
> CLOCKSOURCE_MASK(), for example 64bit counter will never wrap for
> us. But there may be other values like CLOCKSOURCE_MASK(56), I just
> can't figure out exactly how to do this judge.
I don't think there is a good way to do so. Registration time is the
wrong place anyway because the problem depends on:
- The width of the counter
- The frequency of the counter
The frequency of the counter might even change after registration. Now
add the unknown duration of the suspend to the picture and you're
completely lost.
All we can do is provide information about the actual wraparound time,
if the CLOCK_SOURCE_SUSPEND_NONSTOP flag is set and the wraparound
time is less than some reasonable margin.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists