summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2002-05-20 00:16:44 +0000
committermickey <mickey@openbsd.org>2002-05-20 00:16:44 +0000
commit401b13171f02c0c59ca4936d1c5d970dd5e878cf (patch)
treeca70556d1413a4b326c7a5e98f5258edaabf312d
parentthere is an sti man there (diff)
downloadwireguard-openbsd-401b13171f02c0c59ca4936d1c5d970dd5e878cf.tar.xz
wireguard-openbsd-401b13171f02c0c59ca4936d1c5d970dd5e878cf.zip
hardclock() is not called until clock has been initialized
-rw-r--r--sys/arch/hppa/dev/clock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/hppa/dev/clock.c b/sys/arch/hppa/dev/clock.c
index 735fff9d9ca..5ac7a5437db 100644
--- a/sys/arch/hppa/dev/clock.c
+++ b/sys/arch/hppa/dev/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.14 2002/05/14 20:41:33 mickey Exp $ */
+/* $OpenBSD: clock.c,v 1.15 2002/05/20 00:16:44 mickey Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -53,6 +53,7 @@
#endif
struct timeval time;
+int cpu_clockok;
void startrtclock(void);
@@ -65,6 +66,8 @@ cpu_initclocks()
/* Start the interval timer. */
mfctl(CR_ITMR, time_inval);
mtctl(time_inval + cpu_hzticks, CR_ITMR);
+
+ cpu_clockok = 1;
}
int
@@ -76,6 +79,9 @@ clock_intr (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);