Port-hp700 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: preposterous TOD clock time on 5.0



Martin Husemann wrote:

> On Fri, May 08, 2009 at 12:38:08AM +0900, Izumi Tsutsui wrote:
> > Is anyone else seeing this?
> > (note it's on 5.0 so time_t is still 32 bit)
> 
> I see the same on -current (though I thought it works once after power
> cycle, have to retest that again).

Per OpenBSD's hp700/dev/clock.c rev 1.14:
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/hppa/dev/clock.c#rev1.14
the following patch seems to fix the problem:

---
Index: dev/pdc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hp700/dev/pdc.c,v
retrieving revision 1.25
diff -u -r1.25 pdc.c
--- dev/pdc.c   14 Jun 2008 21:27:37 -0000      1.25
+++ dev/pdc.c   7 May 2009 16:01:25 -0000
@@ -475,7 +475,8 @@
        tod.usec = tvp->tv_usec;
 
        pagezero_cookie = hp700_pagezero_map();
-       pdc_call((iodcio_t)PAGE0->mem_pdc, 1, PDC_TOD, PDC_TOD_WRITE, &tod);
+       pdc_call((iodcio_t)PAGE0->mem_pdc, 1, PDC_TOD, PDC_TOD_WRITE,
+           tod.sec, tod.usec);
        hp700_pagezero_unmap(pagezero_cookie);
        return 0;
 }

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index