diff mbox

[v3,API-NEXT,2/4] linux-generic: separate MIPS ODP_CACHE_LINE_SIZE to its arch file

Message ID 1454662607-28792-3-git-send-email-hongbo.zhang@linaro.org
State New
Headers show

Commit Message

Hongbo Zhang Feb. 5, 2016, 8:56 a.m. UTC
From: Hongbo Zhang <hongbo.zhang@linaro.org>

Currently all ODP_CACHE_LINE_SIZE macros for different architectures are
held in one header file, they should be moved to their own arch file.
This patch moves ODP_CACHE_LINE_SIZE for MIPS.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 platform/linux-generic/arch/mips64/odp/cpu_arch.h | 16 ++++++++++++++++
 platform/linux-generic/include/odp/align.h        |  4 ----
 2 files changed, 16 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/arch/mips64/odp/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/cpu_arch.h
index 3bfa0dc..303520b 100644
--- a/platform/linux-generic/arch/mips64/odp/cpu_arch.h
+++ b/platform/linux-generic/arch/mips64/odp/cpu_arch.h
@@ -11,6 +11,22 @@ 
 extern "C" {
 #endif
 
+/** @ingroup odp_compiler_optim
+ *  @{
+ */
+
+/**
+ * @def ODP_CACHE_LINE_SIZE
+ * Cache line size
+ */
+#if defined __OCTEON__
+#define ODP_CACHE_LINE_SIZE 128
+#endif
+
+/**
+ * @}
+ */
+
 static inline void odp_cpu_pause(void)
 {
 	__asm__ __volatile__ ("nop");
diff --git a/platform/linux-generic/include/odp/align.h b/platform/linux-generic/include/odp/align.h
index 161a302..0f11569 100644
--- a/platform/linux-generic/include/odp/align.h
+++ b/platform/linux-generic/include/odp/align.h
@@ -35,10 +35,6 @@  extern "C" {
 
 #define ODP_CACHE_LINE_SIZE 64
 
-#elif defined __OCTEON__
-
-#define ODP_CACHE_LINE_SIZE 128
-
 #elif defined __powerpc__
 
 #define ODP_CACHE_LINE_SIZE 64