diff mbox

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

Message ID 1454662607-28792-4-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 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.zhang@linaro.org>
---
 platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 37 +++++++++++++++++++++-
 platform/linux-generic/include/odp/align.h         |  4 ---
 2 files changed, 36 insertions(+), 5 deletions(-)
 mode change 120000 => 100644 platform/linux-generic/arch/powerpc/odp/cpu_arch.h
diff mbox

Patch

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..5539185
--- /dev/null
+++ b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h
@@ -0,0 +1,36 @@ 
+/* 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
+
+/** @ingroup odp_compiler_optim
+ *  @{
+ */
+
+/**
+ * @def ODP_CACHE_LINE_SIZE
+ * Cache line size
+ */
+#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 0f11569..46b30dc 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