Subject: Re: proposal for changes to todr interface
To: None <garrett_damore@tadpole.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 09/07/2006 01:40:53
garrett_damore@tadpole.com wrote:

> >>     * add todr_flags
> >>
> >>         primarily I want to add a new flag, TODR_USE_LOCALTIME, that
> >>         indicates that the clock chip stores time in the local timezone,
> >>         rather than using a GMT offset.  essentially, this will allow
> >>         the common code to apply the rtc_offset adjustments on behalf of
> >>         the rtc chip.
> >
> > Do you mean that MI drivers will adjust clock as per rtc_offset
> > if TODR_USE_LOCALTIME is set?
> 
> I mean that the routines in kern_todr.c will pass an "adjusted" time
> (using the rtc_offset) to the driver, and apply the rtc_offset from the
> driver as well.   This means that if drivers that need an rtc_offset
> adjustment, they will get it without ever actually being aware of the
> rtc_offset variable.

Hmm, how and where is TODR_USE_LOCALTIME flag set?
Isn't it better to always pass an adjusted time using rtc_offset
in kern_todr.c as old i386 todr functions did?
(since the default of rtc_offset is zero in param.c)

I don't think any driver requires rtc_offset adjustment,
but the machine itself (or maybe other OSes on it) needs
adjustment on reading/storing time regardless of its rtc chip.
---
Izumi Tsutsui