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

Gedare Bloom gedare at gwu.edu
Mon Jun 22 20:36:20 UTC 2015


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)

>         /*
>          * if we don't know the clock frequency, measure it.
>          */
> --
> 1.7.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list