summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorScott Soule Cheloha <cheloha@cvs.openbsd.org>2022-09-10 01:30:15 +0000
committerScott Soule Cheloha <cheloha@cvs.openbsd.org>2022-09-10 01:30:15 +0000
commitbbbe0694324bff20e4ee01995708382f933df139 (patch)
treea645f4b9a6e3e8d7f3941ab9563dbfc317e54e4a /sys/arch/i386
parent894b70b5d9ae8dbfb6af3285232bf2fc422c68be (diff)
amd64, i386: lapic_initclocks: install i8254 before lapic_startclock()
In the future, the clock interrupt code will need a working timecounter to do its job. In lapic_initclocks(), call i8254_inittimecounter_simple() before lapic_startclock(). The i8254 may be be a piece of junk, but one timecounter is better than none.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/lapic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/lapic.c b/sys/arch/i386/i386/lapic.c
index 1f18d4c7744..d3f316cb447 100644
--- a/sys/arch/i386/i386/lapic.c
+++ b/sys/arch/i386/i386/lapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lapic.c,v 1.51 2022/09/06 17:26:27 cheloha Exp $ */
+/* $OpenBSD: lapic.c,v 1.52 2022/09/10 01:30:14 cheloha Exp $ */
/* $NetBSD: lapic.c,v 1.1.2.8 2000/02/23 06:10:50 sommerfeld Exp $ */
/*-
@@ -298,9 +298,8 @@ lapic_startclock(void)
void
lapic_initclocks(void)
{
- lapic_startclock();
-
i8254_inittimecounter_simple();
+ lapic_startclock();
}
extern int gettick(void); /* XXX put in header file */