All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Wolfgang Denk <wd@denx.de>
Cc: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>,
	Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>,
	linux-mips@linux-mips.org
Subject: Re: [patch] Generic time fixes
Date: Tue, 22 Jul 2003 13:21:56 +0200	[thread overview]
Message-ID: <20030722112156.GA12449@linux-mips.org> (raw)
In-Reply-To: <20030722102109.ADB10C6D82@atlas.denx.de>

On Tue, Jul 22, 2003 at 12:21:04PM +0200, Wolfgang Denk wrote:

> Another common situation especially with embedded systems is that the
> RTC holds the "correct"  time,  and  probably  runs  at  much  higher
> precision  than  the systm clock. In such systems, NTP can be used to
> keep the system time in sync with the RTC, but the system  time  must
> never  be  written  back to the RTC. [Except when explicitely setting
> the date&time.]

True; supposedly the TXOs in RTC have higher long term frequency accuracy
than those commonly used to clock system though some RTC are really
badly off.

> > I share your dislike of updating the RTC for performance reasons; these
> 
> There are more problems with the 11 minute mode.  We  ran  into  this
> issue  for hard on some PowerPC systems. Assume a situation where the
> RTC is connected through a I2C  bus.  Problem  1:  normally  the  i2c
> drivers  will  be  loaded prety late, which means the system will run
> initially with an undefined time. Problem 2: on some  actions  a  i2c
> transfer  involves  programming an on-chip i2c controller, which will
> perform the task and then signal it's done by an interrupt. On such a
> system the 11 minute mode will crash the system because rtc_set  will
> be called from interrupt contect itself.
> 
> There was a  somewhat  controverse  discussion  on  the  linuxppc_dev
> mailing list, without a real solution.

[...]

> And never, ever update the RTC from interrupt context, please.

It's the right thing for > 99% of systems and doing it triggered by an
interrupt seems the right thing.  If you happen to have hardware that
has trouble with updates in interrupts you still could implement the
RTC update procedure to just trigger the update in softirq or process
context, as appropriate.

  Ralf

  reply	other threads:[~2003-07-22 11:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-22  7:58 [patch] Generic time fixes Maciej W. Rozycki
2003-07-22  8:32 ` Jan-Benedict Glaw
2003-07-22 10:04 ` Ralf Baechle
2003-07-22 10:21   ` Wolfgang Denk
2003-07-22 11:21     ` Ralf Baechle [this message]
2003-07-22 20:54     ` Maciej W. Rozycki
2003-07-22 17:16   ` Jun Sun
2003-07-22 21:24     ` Maciej W. Rozycki
2003-07-22 20:38   ` Maciej W. Rozycki
2003-07-22 17:10 ` Jun Sun
2003-07-22 21:21   ` Maciej W. Rozycki
2003-07-22 22:37     ` Ralf Baechle
2003-07-22 22:55       ` Maciej W. Rozycki
2003-07-22 22:43     ` Jun Sun
2003-07-22 23:10       ` Maciej W. Rozycki
2003-07-22 23:37         ` Jun Sun
2003-07-23  0:30           ` Maciej W. Rozycki
2003-07-23  1:14             ` Jun Sun
2003-07-23 14:52               ` Maciej W. Rozycki
2003-07-23 17:00                 ` Jun Sun
2003-07-24 11:13                   ` Maciej W. Rozycki

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=20030722112156.GA12449@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=ica2_ts@csv.ica.uni-stuttgart.de \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@ds2.pg.gda.pl \
    --cc=wd@denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.