Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2010 11:11:42 +0000 (UTC)
From:      Takahashi Yoshihiro <nyan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204753 - head/sys/pc98/cbus
Message-ID:  <201003051111.o25BBgtE079318@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nyan
Date: Fri Mar  5 11:11:42 2010
New Revision: 204753
URL: http://svn.freebsd.org/changeset/base/204753

Log:
  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.

Modified:
  head/sys/pc98/cbus/clock.c

Modified: head/sys/pc98/cbus/clock.c
==============================================================================
--- head/sys/pc98/cbus/clock.c	Fri Mar  5 06:06:20 2010	(r204752)
+++ head/sys/pc98/cbus/clock.c	Fri Mar  5 11:11:42 2010	(r204753)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003051111.o25BBgtE079318>