diff options
Diffstat (limited to 'platform/linux-generic/arch/aarch64/odp')
3 files changed, 35 insertions, 10 deletions
diff --git a/platform/linux-generic/arch/aarch64/odp/api/abi/atomic.h b/platform/linux-generic/arch/aarch64/odp/api/abi/atomic.h index d1dbf36b8..14cca3ca0 100644 --- a/platform/linux-generic/arch/aarch64/odp/api/abi/atomic.h +++ b/platform/linux-generic/arch/aarch64/odp/api/abi/atomic.h @@ -9,4 +9,4 @@ #endif #include <odp/api/abi-default/atomic.h> - +#include <odp/api/plat/atomic_inlines.h> diff --git a/platform/linux-generic/arch/aarch64/odp/api/abi/cpu.h b/platform/linux-generic/arch/aarch64/odp/api/abi/cpu.h index 97a2861c5..825ff19d4 100644 --- a/platform/linux-generic/arch/aarch64/odp/api/abi/cpu.h +++ b/platform/linux-generic/arch/aarch64/odp/api/abi/cpu.h @@ -17,15 +17,8 @@ extern "C" { #define ODP_CACHE_LINE_SIZE _ODP_CACHE_LINE_SIZE #endif -static inline void odp_cpu_pause(void) -{ - /* YIELD hints the CPU to switch to another thread if possible - * and executes as a NOP otherwise. - * ISB flushes the pipeline, then restarts. This is guaranteed to - * stall the CPU a number of cycles. - */ - __asm volatile("isb" ::: "memory"); -} +/* Inlined functions for non-ABI compat mode */ +#include <odp/api/plat/cpu_inlines.h> #ifdef __cplusplus } diff --git a/platform/linux-generic/arch/aarch64/odp/api/abi/cpu_inlines.h b/platform/linux-generic/arch/aarch64/odp/api/abi/cpu_inlines.h new file mode 100644 index 000000000..bf44806a0 --- /dev/null +++ b/platform/linux-generic/arch/aarch64/odp/api/abi/cpu_inlines.h @@ -0,0 +1,32 @@ +/* Copyright (c) 2016-2018, Linaro Limited + * Copyright (c) 2021, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_ARCH_CPU_INLINES_H_ +#define ODP_ARCH_CPU_INLINES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +static inline void _odp_cpu_pause(void) +{ + /* YIELD hints the CPU to switch to another thread if possible + * and executes as a NOP otherwise. + * ISB flushes the pipeline, then restarts. This is guaranteed to + * stall the CPU a number of cycles. + */ + __asm volatile("isb" ::: "memory"); +} + +/* Use generic implementations for the rest of the functions */ +#include <odp/api/abi/cpu_generic.h> + +#ifdef __cplusplus +} +#endif + +#endif |