summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-11-12 21:00:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-11-12 21:00:23 +0000
commit4d360638e9fdf546e50f5c4878635eb450b602c1 (patch)
tree119823ee20718de6ea8fbd6252c9249fdf684a1d /sys/arch
parentcccba38449966e6049a44aada5a37d66709a80ca (diff)
Restart clock before invoking hardclock() and statclock(), otherwise they
drift in MP kernels.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme88k/mvme88k/m188_machdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/mvme88k/m188_machdep.c b/sys/arch/mvme88k/mvme88k/m188_machdep.c
index 8596b81c3ed..5b87553897e 100644
--- a/sys/arch/mvme88k/mvme88k/m188_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m188_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m188_machdep.c,v 1.37 2007/11/12 19:59:07 miod Exp $ */
+/* $OpenBSD: m188_machdep.c,v 1.38 2007/11/12 21:00:22 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -821,12 +821,12 @@ m188_clockintr(void *eframe)
CIO_LOCK();
write_cio(CIO_CSR1, CIO_GCB | CIO_CIP); /* Ack the interrupt */
- hardclock(eframe);
-
/* restart counter */
write_cio(CIO_CSR1, CIO_GCB | CIO_TCB | CIO_IE);
CIO_UNLOCK();
+ hardclock(eframe);
+
#ifdef MULTIPROCESSOR
/*
* Send an IPI to all other processors, so they can get their
@@ -849,8 +849,6 @@ m188_statintr(void *eframe)
tmp = *(volatile u_int8_t *)DART_STOPC;
tmp = *(volatile u_int8_t *)DART_ISR;
- statclock((struct clockframe *)eframe);
-
/*
* Compute new randomized interval. The intervals are
* uniformly distributed on
@@ -869,6 +867,8 @@ m188_statintr(void *eframe)
*(volatile u_int8_t *)DART_CTLR = (newint & 0xff);
tmp = *(volatile u_int8_t *)DART_STARTC;
+ statclock((struct clockframe *)eframe);
+
#ifdef MULTIPROCESSOR
/*
* Send an IPI to all other processors as well.