From: Philippe De Muyter <phdm@macqel.be>
To: linux-kernel@vger.kernel.org
Subject: RTC subsystem and fractions of seconds
Date: Sat, 6 Jan 2007 03:29:41 +0100 [thread overview]
Message-ID: <20070106022941.GA32125@ingate.macqel.be> (raw)
Hi all,
A comment in driver/rtc/hctosys says :
/* IMPORTANT: the RTC only stores whole seconds. It is arbitrary
* whether it stores the most close value or the value with partial
* seconds truncated. However, it is important that we use it to store
* the truncated value. This is because otherwise it is necessary,
* in an rtc sync function, to read both xtime.tv_sec and
* xtime.tv_nsec. On some processors (i.e. ARM), an atomic read
* of >32bits is not possible. So storing the most close value would
* slow down the sync API. So here we have the truncated value and
* the best guess is to add 0.5s.
*/
I work with ST m41t81 rtc's. Those rtc's actually have a 1/100th of second
register. Should the generic rtc interface not support that ?
Philippe
--
next reply other threads:[~2007-01-06 2:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 2:29 Philippe De Muyter [this message]
2007-01-06 3:49 RTC subsystem and fractions of seconds David Brownell
2007-01-06 23:26 ` Philippe De Muyter
2007-01-06 23:52 ` David Brownell
2007-01-07 1:11 ` Hugh Dickins
2007-01-07 2:54 ` David Brownell
2007-01-07 9:43 ` Hugh Dickins
2007-01-07 10:02 ` Philippe De Muyter
2007-01-07 10:14 ` Philippe De Muyter
2007-01-08 2:10 ` David Brownell
2007-01-08 10:25 ` Philippe De Muyter
2007-01-07 22:31 Philippe De Muyter
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=20070106022941.GA32125@ingate.macqel.be \
--to=phdm@macqel.be \
--cc=linux-kernel@vger.kernel.org \
/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).