patch-2.2.18 linux/arch/ppc/kernel/time.c
Next file: linux/arch/ppc/kernel/traps.c
Previous file: linux/arch/ppc/kernel/syscalls.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Wed Nov 8 23:00:34 2000
- Orig file:
v2.2.17/arch/ppc/kernel/time.c
- Orig date:
Sat Sep 9 18:42:33 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/arch/ppc/kernel/time.c linux/arch/ppc/kernel/time.c
@@ -71,7 +71,7 @@
{
int dval, d;
unsigned long cpu = smp_processor_id();
-
+
hardirq_enter(cpu);
#ifdef __SMP__
{
@@ -192,10 +192,10 @@
__initfunc(void time_init(void))
{
+ long time_offset = 0;
+
if (ppc_md.time_init != NULL)
- {
- ppc_md.time_init();
- }
+ time_offset = ppc_md.time_init();
if ((_get_PVR() >> 16) == 1) {
/* 601 processor: dec counts down by 128 every 128ns */
@@ -208,6 +208,12 @@
xtime.tv_sec = ppc_md.get_rtc_time();
xtime.tv_usec = 0;
+ if (time_offset) {
+ struct timezone tz;
+ tz.tz_minuteswest = time_offset/60;
+ tz.tz_dsttime = 0; /* Not handled correctly by the kernel anyway */
+ do_sys_settimeofday(NULL, &tz);
+ }
set_dec(decrementer_count);
/* allow updates right away */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)