summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2011-03-11 00:44:32 +0000
committerjkim <jkim@FreeBSD.org>2011-03-11 00:44:32 +0000
commit7df55dcdeb4359716cc7b6a3381d2772e1187d62 (patch)
treec5a4a6ac9d73738d09f204667eb641e541525a80 /sys/contrib
parent8c8d7206ece7a4dc88c61d5910c6724b0137b26a (diff)
downloadFreeBSD-src-7df55dcdeb4359716cc7b6a3381d2772e1187d62.zip
FreeBSD-src-7df55dcdeb4359716cc7b6a3381d2772e1187d62.tar.gz
Add a tunable "machdep.disable_tsc" to turn off TSC. Specifically, it turns
off boot-time CPU frequency calibration, DELAY(9) with TSC, and using TSC as a CPU ticker. Note tsc_present does not change by this tunable.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/altq/altq/altq_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/contrib/altq/altq/altq_subr.c b/sys/contrib/altq/altq/altq_subr.c
index 7d2fc77..a58747d 100644
--- a/sys/contrib/altq/altq/altq_subr.c
+++ b/sys/contrib/altq/altq/altq_subr.c
@@ -78,10 +78,10 @@
#include <machine/clock.h>
#endif
#if defined(__amd64__) || defined(__i386__)
+#include <machine/cpu.h> /* for cpu_feature or tsc_present */
#include <machine/cpufunc.h> /* for pentium tsc */
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <machine/specialreg.h> /* for CPUID_TSC */
-#include <machine/cpu.h> /* for cpu_feature */
#endif
#endif /* __amd64 || __i386__ */
@@ -927,7 +927,7 @@ init_machclk_setup(void)
#if defined(__amd64__) || defined(__i386__)
/* check if TSC is available */
#ifdef __FreeBSD__
- if (tsc_freq == 0)
+ if (!tsc_present || tsc_freq == 0)
#else
if ((cpu_feature & CPUID_TSC) == 0)
#endif
OpenPOWER on IntegriCloud