From: David Brownell <david-b@pacbell.net>
To: john stultz <johnstul@us.ibm.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] Unify interface to persistent CMOS/RTC/whatever clock
Date: Thu, 17 Aug 2006 22:50:35 -0700 [thread overview]
Message-ID: <200608172250.36045.david-b@pacbell.net> (raw)
In-Reply-To: <1155859636.31755.159.camel@cog.beaverton.ibm.com>
By the way, one furher observation:
> > Presumably this is stuff that should be done by the RTC class resume()
> > method, probably for the CONFIG_RTC_HCTOSYS_DEVICE clock (though there
> > could be a better RTC ... one that's being NTP-corrected). That'd
> > be no sooner than 2.6.19, which adds new class-level suspend()/resume()
> > calls to help offload individual drivers.
>
> Hrm. I'm a bit skeptical that the RTC resume code should update the
> timekeeping code instead of the timekeeping code doing it.
But how could timekeeping code know when the RTC is accessible again?
It might be unusable until after e.g. an I2C controller and then the RTC
are resumed (and maybe a parent to the I2C controller) ... the class
resume mechanism piggybacks on the normal resume sequencing, so doing it
that way would automatically resolve that issue.
> It seems that
> it would cause additional complexity (what if there are two RTC
> devices?) and would still have some of the suspend/resume ordering
> issues I'm worried about.
The RTC framework currently "knows" which RTC is used for the hctosys
update, so that approach can be addressed by saving a single pointer
and adding some class suspend()/resume() code to test it. No complexity
necessary; if it's good enough to set the initial system time, it's
good enough to set it again after resume. (And maybe all the RTCs
should be getting NTP updates, not just one of them ...)
I think that if you keep in mind that scenario -- I2C used to access
the RTC clock -- and make sure it works, you'll notice a few details
of your current approach that need to be changed.
In particular, it is impossible for any sys_device's driver resume()
to access I2C (since that resume is done with irqs disabled, while i2c
controllers normally require irqs to run); but that's what the current
version of timekeeping_resume() in your patch would be doing.
- Dave
next prev parent reply other threads:[~2006-08-18 5:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-17 5:47 [RFC][PATCH] Unify interface to persistent CMOS/RTC/whatever clock David Brownell
2006-08-17 19:08 ` john stultz
2006-08-17 20:28 ` David Brownell
2006-08-17 21:42 ` john stultz
2006-08-17 23:41 ` David Brownell
2006-08-18 0:07 ` john stultz
2006-08-18 1:38 ` David Brownell
2006-08-18 23:36 ` john stultz
2006-08-19 16:39 ` David Brownell
2006-08-19 16:44 ` David Brownell
2006-08-18 5:50 ` David Brownell [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-16 22:45 john stultz
2006-08-17 1:49 ` john stultz
2006-08-17 9:20 ` Martin Schwidefsky
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=200608172250.36045.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=johnstul@us.ibm.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