svn commit: r209103 - head/sys/i386/i386

Alexander Motin mav at FreeBSD.org
Sat Jun 12 13:10:04 UTC 2010


Author: mav
Date: Sat Jun 12 13:10:03 2010
New Revision: 209103
URL: http://svn.freebsd.org/changeset/base/209103

Log:
  Check general TSC presence before doing more specific checks and printfs.

Modified:
  head/sys/i386/i386/tsc.c

Modified: head/sys/i386/i386/tsc.c
==============================================================================
--- head/sys/i386/i386/tsc.c	Sat Jun 12 12:19:08 2010	(r209102)
+++ head/sys/i386/i386/tsc.c	Sat Jun 12 13:10:03 2010	(r209103)
@@ -123,6 +123,10 @@ init_TSC(void)
 void
 init_TSC_tc(void)
 {
+
+	if (!tsc_present) 
+		return;
+
 	/*
 	 * We can not use the TSC if we support APM.  Precise timekeeping
 	 * on an APM'ed machine is at best a fools pursuit, since 
@@ -152,7 +156,7 @@ init_TSC_tc(void)
 		tsc_timecounter.tc_quality = -100;
 #endif
 
-	if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
+	if (tsc_freq != 0 && !tsc_is_broken) {
 		tsc_timecounter.tc_frequency = tsc_freq;
 		tc_init(&tsc_timecounter);
 	}


More information about the svn-src-head mailing list