[PATCH] altq_subr.c: Disable x86 specific code on RTEMS

Joel Sherrill joel.sherrill at oarcorp.com
Tue Jul 14 22:42:08 UTC 2015


---
 freebsd/sys/contrib/altq/altq/altq_subr.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/freebsd/sys/contrib/altq/altq/altq_subr.c b/freebsd/sys/contrib/altq/altq/altq_subr.c
index 3ebd58d..55f0977 100644
--- a/freebsd/sys/contrib/altq/altq/altq_subr.c
+++ b/freebsd/sys/contrib/altq/altq/altq_subr.c
@@ -930,6 +930,9 @@ init_machclk_setup(void)
 #if defined(__NetBSD__) && defined(MULTIPROCESSOR)
 	machclk_usepcc = 0;
 #endif
+#if defined(__rtems__)
+		machclk_usepcc = 0;
+#else
 #if defined(__amd64__) || defined(__i386__)
 	/* check if TSC is available */
 #ifdef __FreeBSD__
@@ -940,6 +943,7 @@ init_machclk_setup(void)
 #endif
 		machclk_usepcc = 0;
 #endif
+#endif
 }
 
 void
@@ -967,6 +971,7 @@ init_machclk(void)
 	 * if the clock frequency (of Pentium TSC or Alpha PCC) is
 	 * accessible, just use it.
 	 */
+#ifndef __rtems__
 #if defined(__amd64__) || defined(__i386__)
 #ifdef __FreeBSD__
 	machclk_freq = atomic_load_acq_64(&tsc_freq);
@@ -976,7 +981,7 @@ init_machclk(void)
 	machclk_freq = pentium_mhz * 1000000;
 #endif
 #endif
-
+#endif
 	/*
 	 * if we don't know the clock frequency, measure it.
 	 */
-- 
1.7.1



More information about the devel mailing list