public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: "David P. Reed" <dpreed@reed.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: do get_rtc_time() correctly
Date: Wed, 15 Aug 2007 17:15:17 -0700	[thread overview]
Message-ID: <46C39715.6030602@zytor.com> (raw)
In-Reply-To: <46C35284.1080003@reed.com>

David P. Reed wrote:
> 
> The idea in the comment at the top seems to suggest that the author
> thought that the UIP flag indicates an update is in progress at that
> very instant, so one needs to synchronize with the "falling edge" of
> that flag to ensure that one can read the RTC state without instability
> in its buffered value.   That is not the way the UIP flag is defined to
> work. 
> The UIP flag is =1 during a period PRIOR to the actual update, starting
> 224 usec before the update, and ending when the update is complete.   It
> is done that way (which might seem odd) so that if you read UIP=0, you
> have a 224 usec window, EVEN IF the UIP were to become =1 just after you
> read it.
> 

That's not why it synchronizes with the UIP flag.

The purpose is to figure out where the RTC thinks the beginning of the
second is.

One can argue about the utility of that (since it's uncertain whether
setting the RTC will cause the beginning of the second to be updated),
but that was supposedly the reason for it 15 years ago.

	-hpa

      parent reply	other threads:[~2007-08-16  0:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 19:22 RFC: do get_rtc_time() correctly David P. Reed
2007-08-15 23:51 ` Alan Cox
2007-08-16  0:26   ` David P. Reed
2007-08-16  0:54     ` Rene Herman
2007-08-16 10:05     ` Alan Cox
2007-08-16  0:15 ` H. Peter Anvin [this message]

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=46C39715.6030602@zytor.com \
    --to=hpa@zytor.com \
    --cc=dpreed@reed.com \
    --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