From cfd792315d36da5bd25ea7553f1b8ff07c32569f Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Wed, 27 Nov 2002 21:47:15 +0000 Subject: no wrapper arounf hardclock(), use CPU_CLOCKUPDATE, real microtime; miod ok --- sys/arch/hppa/dev/clock.c | 43 ++----------------------------------------- sys/arch/hppa/dev/cpu.c | 4 ++-- 2 files changed, 4 insertions(+), 43 deletions(-) (limited to 'sys/arch/hppa/dev') 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 #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); } -- cgit v1.2.3