From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Feng Tang <feng.tang@intel.com>,
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 14:56:51 -0700 [thread overview]
Message-ID: <20121214215651.GA31384@obsidianresearch.com> (raw)
In-Reply-To: <50CB98AA.5090600@linaro.org>
On Fri, Dec 14, 2012 at 01:22:50PM -0800, John Stultz wrote:
> Although from a timekeeping perspective, the read_persistent_clock()
> interface is actually *much* preferred over the rtc HCTOSYS device.
>
> Since read_persistent_clock() has the requirement that its safe to
> call with IRQs disabled, we can use it in the timekeeping
> suspend/resume code, which allows for better time accuracy.
Sure, but my view on this is that it has nothing to do with
read_persistent_clock. If the RTC driver can run with IRQs off is a
property of the RTC driver and RTC hardware - it has nothing to do
with the platform. ARM platforms will vary on a machine by machine
basis. The rtc-mv driver used on my ARM system is perfectly
re-entrant, lots of rtc on SOC drivers will be the same.
If this is the only thing keeping you on read_persistent_clock, for
real RTCs, then how about a RTC_DEV_SAFE_READ flag (or whatever) in
rtc_device.flags?
Reserve read_persistent_clock for things like that very specialized
non-RTC ARM counter.
>
> While we're suggesting cleanups, the RTC Kconfig choices probably
> need a cleanup too, as the list of all possible drivers can be
> confusing, when usually each architecture has only a few that they
That is a general pain with the new 'everything is a driver'..
However device tree enabled stuff is much nicer, just grep the tree
for the compatible string and you'll find a big clue about what
physical boards are using that driver.
For instance:
rtc@10300 {
compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
reg = <0x10300 0x20>;
interrupts = <53>;
};
is matched to:
drivers/rtc/rtc-mv.c:
static struct of_device_id rtc_mv_of_match_table[] = {
{ .compatible = "marvell,orion-rtc", },
> exclusively support (I know there are exceptions to this). It makes
> it hard to even figure out for a specific rtc driver what
> architecture one should look for in order to test with (I usually
With anything embedded the answer is 'anything and everything'
unfortunately. For example, our board has two bits of RTC capable
hardware - one inside the CPU SOC and one outside. We went through a
big analysis to pick the best one, based on battery selection and
battery life time. Even the presence of a RTC block in a SOC is not a
guarentee it will be used universally.
Regards,
Jason
next prev parent reply other threads:[~2012-12-14 21:57 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
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 [this message]
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=20121214215651.GA31384@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=a.zummo@towertech.it \
--cc=alek.du@intel.com \
--cc=feng.tang@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).