[PATCH] altq_subr.c: Disable x86 specific code on RTEMS
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jul 15 07:59:44 UTC 2015
I tried to clarify the rules for FreeBSD code changes:
https://git.rtems.org/rtems-libbsd/commit/?id=a57dfa0dedc1f25c4dfd6e0c786a1dbf72f44a03
On 15/07/15 00:42, Joel Sherrill 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
> /*
> * if we don't know the clock frequency, measure it.
> */
--
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