summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2010-03-05 11:11:42 +0000
committernyan <nyan@FreeBSD.org>2010-03-05 11:11:42 +0000
commit8c36a84a3586384c2905a68e8b48be1f447df4cf (patch)
tree48b106392ef23c6282d105dd3c20a354ad840064 /sys/pc98
parent69169912d6b729264e037d88e078ee6f5136dc07 (diff)
downloadFreeBSD-src-8c36a84a3586384c2905a68e8b48be1f447df4cf.zip
FreeBSD-src-8c36a84a3586384c2905a68e8b48be1f447df4cf.tar.gz
MFx86: the part of r204641
In order to do that cleanly, lapic_setup_clock(), on both ia32 and amd64, now accepts as arguments the desired sources to handle, and returns the actual ones (LAPIC_CLOCK_NONE is forbidden because otherwise there is no meaning in calling such function). This allows to bring out into commont x86 code the handling part for machdep.lapic_allclocks tunable, which is retained.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/clock.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index 10b2598..22ed8a5 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -93,6 +93,9 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq);
int i8254_max_count;
static int i8254_real_max_count;
+static int lapic_allclocks;
+TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks);
+
static struct mtx clock_lock;
static struct intsrc *i8254_intsrc;
static u_int32_t i8254_lastcount;
@@ -432,9 +435,11 @@ startrtclock()
void
cpu_initclocks()
{
+#if defined(DEV_APIC)
+ enum lapic_clock tlsca;
-#ifdef DEV_APIC
- using_lapic_timer = lapic_setup_clock();
+ tlsca = lapic_allclocks == 0 ? LAPIC_CLOCK_HARDCLOCK : LAPIC_CLOCK_ALL;
+ using_lapic_timer = lapic_setup_clock(tlsca);
#endif
/*
* If we aren't using the local APIC timer to drive the kernel
OpenPOWER on IntegriCloud