[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADcy93UD1EHiHLsgCPjODZMu1fBpKhOXuN=4Egwu6gB2UZX0+w@mail.gmail.com>
Date: Sat, 24 Jan 2015 01:53:18 +0800
From: Xunlei Pang <pang.xunlei@...aro.org>
To: Thomas Gleixner <tglx@...utronix.de>
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
Hi Thomas,
On 23 January 2015 at 05:07, Thomas Gleixner <tglx@...utronix.de> wrote:
> On Thu, 22 Jan 2015, Xunlei Pang wrote:
>> When doing timekeeping_resume(), if the nonstop clocksource
>> wraps back, "cycle_delta" will miss the wrap time.
>>
>> It's hard to determine the right CLOCKSOURCE_MASK(xxx) or
>> something to add code for inspecting such behavior, and we
>> don't have many existent nonstop clocksources, so just add
>> a comment to indicate that if have this flag set, people
>> are aware that this nonstop clocksource won't wrap back
>> during system suspend/resume.
>
> -ENOPARSE
>
> What has the CLOCKSOURCE_MASK() to do with this and why is the fact
> relevant, that we only have a few suspend_nonstop clock sources?
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.
So, I think we can only add a comment to let the developer be aware of
this when registering
nonstop clocksource, that's what I want to express.
>
>> +
>> +/*
>> + * When setting this flag, you're also supposed to mean that it doesn't
>> + * wrap back during system suspend/resume. See timekeeping_resume().
>
> -ENOPARSE
>
> I guess what you want to say here is:
>
> /*
> * clocksource continues to run during suspend and is guaranteed not to
> * wrap around during long suspend periods.
> */
>
Yes, this description is way better :-)
Thanks,
Xunlei
--
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