mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "David P. Reed" <dpreed@reed.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: do get_rtc_time() correctly
Date: Thu, 16 Aug 2007 00:51:51 +0100	[thread overview]
Message-ID: <20070816005151.56176a04@the-village.bc.nu> (raw)
In-Reply-To: <46C35284.1080003@reed.com>

> So the proper way to read the RTC contents is to read the UIP flag, and 
> if zero, read all the RTC registers with interrupts masked completely, 
> so all reads happen in the 224 usec window.  (NMI can still be a 
> problem, but you can have NMI's set a flag that forces a retry).

SMM/SMI is more likely to be what bumps you 224usec or more.

> I'm happy to code and test a patch.   Rather than just submit a patch, I 
> thought I'd request others' comments on this, since it affects so many 
> architectures.  cc me, if you will, as I don't subscribe to LKML, just 
> check it periodically.

Go for it. The other architectures generally inherit it by inheriting
similar bridge chips or in more modern times the RTC macrocell. It should
also be possible to debug by putting in an optional sanity check
initially which checks the read made sense compared to a few more

  reply	other threads:[~2007-08-15 23:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 19:22 David P. Reed
2007-08-15 23:51 ` Alan Cox [this message]
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

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=20070816005151.56176a04@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --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

all inboxes | Powered by JetHome®