[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46C39715.6030602@zytor.com>
Date: Wed, 15 Aug 2007 17:15:17 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: "David P. Reed" <dpreed@...d.com>
CC: linux-kernel@...r.kernel.org
Subject: Re: RFC: do get_rtc_time() correctly
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists