summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-11-27 21:47:15 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-11-27 21:47:15 +0000
commitcfd792315d36da5bd25ea7553f1b8ff07c32569f (patch)
tree0b3e1b6d67062dc9c1a07c9bf37114d8561f4db6 /sys/arch/hppa/dev
parentd89097e161bdceaa7d8366237301a50ee9b885b4 (diff)
no wrapper arounf hardclock(), use CPU_CLOCKUPDATE, real microtime; miod ok
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r--sys/arch/hppa/dev/clock.c43
-rw-r--r--sys/arch/hppa/dev/cpu.c4
2 files changed, 4 insertions, 43 deletions
diff --git a/sys/arch/hppa/dev/clock.c b/sys/arch/hppa/dev/clock.c
index aadf3e6b9d4..e9b6ec902ec 100644
--- a/sys/arch/hppa/dev/clock.c
+++ b/sys/arch/hppa/dev/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.16 2002/09/15 09:45:15 mickey Exp $ */
+/* $OpenBSD: clock.c,v 1.17 2002/11/27 21:47:14 mickey Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -52,50 +52,12 @@
#include <ddb/db_extern.h>
#endif
-struct timeval time;
-int cpu_clockok;
-
-void startrtclock(void);
-
void
cpu_initclocks()
{
- extern u_int cpu_hzticks;
- u_int time_inval;
-
- /* Start the interval timer. */
- mfctl(CR_ITMR, time_inval);
- mtctl(time_inval + cpu_hzticks, CR_ITMR);
-
- cpu_clockok = 1;
-}
-
-int
-clock_intr (v)
- void *v;
-{
- struct trapframe *frame = v;
-
- /* printf ("clock int 0x%x @ 0x%x for %p\n", t,
- frame->tf_iioq_head, curproc); */
-
- if (!cpu_clockok)
- return (1);
-
- cpu_initclocks();
- hardclock(frame);
-
-#if 0
- ddb_regs = *frame;
- db_show_regs(NULL, 0, 0, NULL);
-#endif
-
- /* printf ("clock out 0x%x\n", t); */
-
- return 1;
+ CPU_CLOCKUPDATE();
}
-
/*
* initialize the system time from the time of day clock
*/
@@ -152,4 +114,3 @@ setstatclockrate(newhz)
{
/* nothing we can do */
}
-
diff --git a/sys/arch/hppa/dev/cpu.c b/sys/arch/hppa/dev/cpu.c
index 661741c3be6..966e6e43ee7 100644
--- a/sys/arch/hppa/dev/cpu.c
+++ b/sys/arch/hppa/dev/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.18 2002/05/23 16:03:39 mickey Exp $ */
+/* $OpenBSD: cpu.c,v 1.19 2002/11/27 21:47:14 mickey Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -186,7 +186,7 @@ cpuattach(parent, self, aux)
/* sanity against lusers amongst config editors */
if (ca->ca_irq == 31)
sc->sc_ih = cpu_intr_establish(IPL_CLOCK, ca->ca_irq,
- clock_intr, NULL /*trapframe*/, &sc->sc_dev);
+ (int (*)(void *))hardclock, NULL /*frame*/, &sc->sc_dev);
else
printf ("%s: bad irq %d\n", sc->sc_dev.dv_xname, ca->ca_irq);
}