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

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jun 23 05:58:32 UTC 2015



On 22/06/15 22:37, Gedare Bloom wrote:
> On Mon, Jun 22, 2015 at 4:36 PM, Gedare Bloom<gedare at gwu.edu>  wrote:
>> >On Mon, Jun 22, 2015 at 3:43 PM, Joel Sherrill
>> ><joel.sherrill at oarcorp.com>  wrote:
>>> >>---
>>> >>  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
>> >I think you're supposed to avoid removing lines (even blank ones)
> Also demarcate the endif with /* __rtems__ */
>

Yes, please.

I was able to update from FreeBSD 8.4, 9.2, 9.3, and 9-stable recently 
and these markers help a lot!

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list