From: Feng Tang <feng.tang@intel.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Alessandro Zummo <a.zummo@towertech.it>,
linux-kernel@vger.kernel.org, alek.du@intel.com
Subject: Re: [PATCH 1/3] timekeeping: Add persistent_clock_exist flag
Date: Fri, 14 Dec 2012 09:37:25 +0800 [thread overview]
Message-ID: <20121214013725.GA11276@feng-snb> (raw)
In-Reply-To: <50CA7EE4.3000306@linaro.org>
Hi John,
Thanks for the review.
On Thu, Dec 13, 2012 at 05:20:36PM -0800, John Stultz wrote:
> On 12/12/2012 06:05 PM, Feng Tang wrote:
> >In current kernel, there are several places which need to check
> >whether there is a persistent clock for the platform. Current check
> >is done by calling the read_persistent_clock() and validating the
> >return value.
> >
> >Add such a flag to make code more readable and call read_persistent_clock()
> >only once for all the checks.
> Sorry.. What the actual benefit of this patch set? (Usually with
> changelogs its better to explain why you're doing something, rather
> then just what you're doing.)
The main benefits is not bother to do the rtc_resume and rtc_suspend work
if persistent clock exists. Current RTC suspend/resume code will do many
time calculation and compensation work at first, and then call
timekeeping_inject_sleeptime() which will just return for platform with
persistent clock, what I did in this patchset is to put the check at
the start, also I save the persistent_clock_exist flag for all possible
check after timekeeping_init().
>
> Maybe I'm missing something, but it seems this doesn't change the
> resulting logic of the code, does it? As I thought we already check
> read_persistent_clocks() output (and make sure its null) before
> using the rtc HCTOSYS_DEVICE.
No, it doesn't change the code logic.
Thanks,
Feng
next prev parent reply other threads:[~2012-12-14 1:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 2:05 [PATCH 1/3] timekeeping: Add persistent_clock_exist flag Feng Tang
2012-12-13 2:05 ` [PATCH 2/3] rtc: Skip the suspend/resume handling if persistent clock exist Feng Tang
2012-12-13 2:05 ` [PATCH 3/3] rtc: Skip setting xtime if persisent " Feng Tang
2012-12-14 1:20 ` [PATCH 1/3] timekeeping: Add persistent_clock_exist flag John Stultz
2012-12-14 1:37 ` Feng Tang [this message]
2012-12-14 2:00 ` John Stultz
2012-12-14 2:15 ` Feng Tang
2012-12-14 2:38 ` Jason Gunthorpe
2012-12-14 3:13 ` Feng Tang
2012-12-14 4:10 ` Jason Gunthorpe
2012-12-14 21:22 ` John Stultz
2012-12-14 21:56 ` Jason Gunthorpe
2012-12-14 23:23 ` John Stultz
2012-12-17 16:14 ` Feng Tang
2012-12-17 18:22 ` Jason Gunthorpe
2012-12-18 2:44 ` Feng Tang
2012-12-14 21:36 ` John Stultz
2012-12-20 7:02 ` Feng Tang
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=20121214013725.GA11276@feng-snb \
--to=feng.tang@intel.com \
--cc=a.zummo@towertech.it \
--cc=alek.du@intel.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).