From: Xunlei Pang <pang.xunlei@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: rtc-linux@googlegroups.com, Thomas Gleixner <tglx@linutronix.de>,
Alessandro Zummo <a.zummo@towertech.it>,
Feng Tang <feng.tang@intel.com>,
John Stultz <john.stultz@linaro.org>,
Arnd Bergmann <arnd.bergmann@linaro.org>,
Xunlei Pang <pang.xunlei@linaro.org>
Subject: [PATCH 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP
Date: Tue, 20 Jan 2015 16:41:30 +0000 [thread overview]
Message-ID: <1421772090-13113-3-git-send-email-pang.xunlei@linaro.org> (raw)
In-Reply-To: <1421772090-13113-1-git-send-email-pang.xunlei@linaro.org>
When doing timekeeping_resume(), if the nonstop clocksource wraps
back, "cycle_delta" will miss the wrap time.
So add a comment to indicate that if have this flag set, you are
aware that this nonstop clocksource won't wrap during suspension.
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
include/linux/clocksource.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index abcafaa..20bca76 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -207,6 +207,11 @@ struct clocksource {
#define CLOCK_SOURCE_WATCHDOG 0x10
#define CLOCK_SOURCE_VALID_FOR_HRES 0x20
#define CLOCK_SOURCE_UNSTABLE 0x40
+
+/*
+ * Setting this flag, also means it doesn't wrap back during
+ * system suspend/resume. See timekeeping_resume().
+ */
#define CLOCK_SOURCE_SUSPEND_NONSTOP 0x80
#define CLOCK_SOURCE_RESELECT 0x100
--
1.9.1
next prev parent reply other threads:[~2015-01-20 16:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 16:41 [PATCH 1/3] time: Don't bother to run rtc_resume() for nonstop clocksource Xunlei Pang
2015-01-20 16:41 ` [PATCH 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume() Xunlei Pang
2015-01-20 16:41 ` Xunlei Pang [this message]
2015-01-21 10:22 ` [PATCH 1/3] time: Don't bother to run rtc_resume() for nonstop clocksource Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421772090-13113-3-git-send-email-pang.xunlei@linaro.org \
--to=pang.xunlei@linaro.org \
--cc=a.zummo@towertech.it \
--cc=arnd.bergmann@linaro.org \
--cc=feng.tang@intel.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®