yamt
ad5800688c
reduce #ifdef __HAVE_TIMECOUNTER.
2007-12-22 00:35:32 +00:00
ad
7d57af5baa
Pull in sys/intr.h
2007-11-29 18:04:46 +00:00
peter
7644942c0e
Minor KNF, replace some spaces with tabs.
2006-09-24 18:24:55 +00:00
tsutsui
292139732b
Tweak some debug messages.
2006-09-20 09:37:28 +00:00
gdamore
06522e0f81
Pass the filesystem time to clock drivers in the todr_chip_handle, so that
...
vax, and pmax can use it.
2006-09-16 00:50:52 +00:00
gdamore
747bc86364
Comment nit (remove first person), from simon@.
2006-09-12 21:38:55 +00:00
gdamore
ba5268f32b
Centralize rtc_offset handling for ports that __HAVE_GENERIC_TODR and use
...
a simple second counter instead of the clock_ymdhms support.
2006-09-12 20:47:39 +00:00
gdamore
2a1a021930
Remove attempt to incorrectly support fictional double leap seconds.
...
While here, make the comparisions for hour, min, and sec use ">" consistently
like the date comparisions.
2006-09-12 15:25:05 +00:00
gdamore
73700aff66
Fix to compile on platforms without __HAVE_GENERIC_TODR. Sorry about
...
that. Pointed out jdc@ and he@.
2006-09-12 14:27:17 +00:00
gdamore
58af66bd2c
Add some optional debug (enabled with TODR_DEBUG) to see what your RTC
...
is giving you. Also, while here, bump the threshold for "preposterous"
dates by 20 years. Now any date earlier than late 1994 is considered
preposterous.
2006-09-12 05:47:47 +00:00
gdamore
9a6f8be8b3
Don't bother checking wday, that breaks some clock chips. Thank to Kurt Schreiner <ks at ub dot uni-mainz dot de>.
2006-09-11 20:48:55 +00:00
gdamore
a012c5d7ea
Allow for leap seconds.
2006-09-10 16:25:32 +00:00
gavan
843ed515f0
dsrtc_settime already takes a volatile struct timeval *, also qualify
...
with volatile for dsrtc_gettime.
2006-09-10 14:06:54 +00:00
tsutsui
ca3e00268a
- add more sanity checks (from playstation2/clock.c)
...
- fix a typo
2006-09-10 07:06:48 +00:00
gdamore
6347eaa294
Run tc_setclock at splclock(). Suggested by kardel@.
2006-09-07 15:49:49 +00:00
dogcow
fe798dd421
Now compiles on systems without __HAVE_GENERIC_TODR
2006-09-07 07:26:07 +00:00
gdamore
8e82fb3308
Eliminate the 2038 year check, because clock_ymdhms_to_sec already performs
...
that check. So instead, we test to make sure we have a non-negative second
after the conversion.
While here, we also add a check to round the second counter up when setting
time if we are more than half-way into the second.
2006-09-07 04:51:42 +00:00
gdamore
6b6be489ab
Add a few consistency checks for ymdhms. Taken from the mc146818 code.
2006-09-07 04:24:26 +00:00
uwe
d9aa7ac028
Make timeval argument to todr_settime volatile to keep non-timecounter
...
ports happy.
2006-09-07 01:50:49 +00:00
uwe
076748ce26
Mark sizeof(tvp->tv_sec) check CONSTCOND.
...
No space between the sizeof and the paren.
2006-09-07 01:43:52 +00:00
gdamore
942bfe3e30
Add support for new todr entry points for drivers- todr_gettime_ymdhms and
...
todr_settime_ymdhms. This allows drivers to avoid repeated conversions, and
allows us to centralize check for Y2038 overflow. As discussed on
tech-kern.
2006-09-07 00:10:49 +00:00
matt
7cdae31eb1
Before calling todr_gettime, fill in tv.tv_sec. At least one port (vax)
...
needs that functionality.
2006-09-05 19:32:17 +00:00
gdamore
7b0092122f
Update the base time (used when no filesystem or rtc time exists) to 12pm,
...
Jan 1, 2006. This is somewhat arbitrary, but its a heck of a lot better than
mid 1991. :-)
2006-09-03 17:13:04 +00:00
gdamore
487ed45995
Don't warn about RTC losing/gaining days if the filesystem time is bogus.
2006-09-03 06:37:55 +00:00
gdamore
a6abab1852
Incorporate changes from x86/i386 as follows:
...
1) don't set a clock when panicing during early boot
2) if the filesystem time is newer than the rtc time (by at least 2 days) then
revert to the filesystem time.
3) use x86 style messaging.
We still use a threshold of 2 days of gain or loss in time to warn though.
2006-09-03 05:25:05 +00:00
gdamore
c583da0d13
Add MI implementation of inittodr, todr_attach, and resettodr.
...
This is triggered upon __HAVE_GENRIC_TODR in machine/types.h. Conversion of
evbmips port forthcoming.
2006-09-02 20:18:00 +00:00