diff mbox

[v4,3/8] linux-generic: separate PowerPC ODP_CACHE_LINE_SIZE to its arch file

Message ID 1456215173-4456-4-git-send-email-hongbo.zhang@linaro.org
State Accepted
Commit 111f27097fb0420bb1aa4f6279ab120a2cf4747c
Headers show

Commit Message

Hongbo Zhang Feb. 23, 2016, 8:12 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>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 33 +++++++++++++++++++++-
 platform/linux-generic/include/odp/align.h         |  4 ---
 2 files changed, 32 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..29f8889
--- /dev/null
+++ b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h
@@ -0,0 +1,32 @@ 
+/* 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
+ *  @{
+ */
+
+#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