Message ID | 1454066534-32694-2-git-send-email-hongbo.zhang@linaro.org |
---|---|
State | New |
Headers | show |
diff --git a/platform/linux-generic/arch/x86/odp/cpu_arch.h b/platform/linux-generic/arch/x86/odp/cpu_arch.h index 997a954..24903ac 100644 --- a/platform/linux-generic/arch/x86/odp/cpu_arch.h +++ b/platform/linux-generic/arch/x86/odp/cpu_arch.h @@ -11,6 +11,8 @@ extern "C" { #endif +#define ODP_CACHE_LINE_SIZE 64 + static inline void odp_cpu_pause(void) { #ifdef __SSE2__ diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux-generic/include/odp/align.h index be8c9ae..4e045c6 100644 --- a/platform/linux-generic/include/odp/align.h +++ b/platform/linux-generic/include/odp/align.h @@ -31,11 +31,7 @@ extern "C" { #define ODP_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member) -#if defined __x86_64__ || defined __i386__ - -#define ODP_CACHE_LINE_SIZE 64 - -#elif defined __arm__ || defined __aarch64__ +#if defined __arm__ || defined __aarch64__ #define ODP_CACHE_LINE_SIZE 64 @@ -47,8 +43,6 @@ extern "C" { #define ODP_CACHE_LINE_SIZE 64 -#else -#error GCC target not found #endif #else diff --git a/platform/linux-generic/include/odp_align_internal.h b/platform/linux-generic/include/odp_align_internal.h index 4ca5ceb..99788e3 100644 --- a/platform/linux-generic/include/odp_align_internal.h +++ b/platform/linux-generic/include/odp_align_internal.h @@ -18,6 +18,7 @@ extern "C" { #endif #include <odp/align.h> +#include <odp/cpu_arch.h> /** @addtogroup odp_compiler_optim * @{