From: Hongbo Zhang <hongbo.zh...@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 PowerPC.
The previous arch/powerpc/odp/cpu_arch.h was a symlink to the generic
arch/linux/odp/cpu_arch.h, but now this PowerPC header file has more
specific content than the generic one, so a real file is created and the
ODP_CACHE_LINE_SIZE is added to it.

Signed-off-by: Hongbo Zhang <hongbo.zh...@linaro.org>
---
 platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 25 +++++++++++++++++++++-
 platform/linux-generic/include/odp/align.h         |  4 ----
 2 files changed, 24 insertions(+), 5 deletions(-)
 mode change 120000 => 100644 platform/linux-generic/arch/powerpc/odp/cpu_arch.h

diff --git a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h 
b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h
deleted file mode 120000
index 0617d7f..0000000
--- a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h
+++ /dev/null
@@ -1 +0,0 @@
-../../linux/odp/cpu_arch.h
\ No newline at end of file
diff --git a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h 
b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h
new file mode 100644
index 0000000..e56523f
--- /dev/null
+++ b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#ifndef ODP_PLAT_CPU_ARCH_H_
+#define ODP_PLAT_CPU_ARCH_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ODP_CACHE_LINE_SIZE 64
+
+static inline void odp_cpu_pause(void)
+{
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/include/odp/align.h 
b/platform/linux-generic/include/odp/align.h
index 6aba925..75c02ae 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 __powerpc__
-
-#define ODP_CACHE_LINE_SIZE 64
-
 #endif
 
 #else
-- 
2.1.4

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to