@@ -14,6 +14,8 @@
#ifndef ODP_ALIGN_H_
#define ODP_ALIGN_H_
+#include <plat/odp_align.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -43,38 +45,10 @@ extern "C" {
*/
#define ODP_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)
-#if defined __x86_64__ || defined __i386__
-
-/** Cache line size */
-#define ODP_CACHE_LINE_SIZE 64
-
-#elif defined __arm__
-
-/** Cache line size */
-#define ODP_CACHE_LINE_SIZE 64
-
-#elif defined __OCTEON__
-
-/** Cache line size */
-#define ODP_CACHE_LINE_SIZE 128
-
-#elif defined __powerpc__
-
-/** Cache line size */
-#define ODP_CACHE_LINE_SIZE 64
-
-#else
-#error GCC target not found
-#endif
-
#else
#error Non-gcc compatible compiler
#endif
-/** Page size */
-#define ODP_PAGE_SIZE 4096
-
-
/*
* Round up
*/
@@ -155,7 +129,6 @@ extern "C" {
#define ODP_ALIGNED_PAGE ODP_ALIGNED(ODP_PAGE_SIZE)
-
/*
* Check align
*/
@@ -174,16 +147,8 @@ extern "C" {
#define ODP_VAL_IS_POWER_2(x) ((((x)-1) & (x)) == 0)
-
#ifdef __cplusplus
}
#endif
#endif
-
-
-
-
-
-
-
new file mode 100644
@@ -0,0 +1,61 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP alignments
+ */
+
+#ifndef ODP_ALIGN_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef __GNUC__
+
+#if defined __x86_64__ || defined __i386__
+
+/** Cache line size */
+#define ODP_CACHE_LINE_SIZE 64
+
+#elif defined __arm__
+
+/** Cache line size */
+#define ODP_CACHE_LINE_SIZE 64
+
+#elif defined __OCTEON__
+
+/** Cache line size */
+#define ODP_CACHE_LINE_SIZE 128
+
+#elif defined __powerpc__
+
+/** Cache line size */
+#define ODP_CACHE_LINE_SIZE 64
+
+#else
+#error GCC target not found
+#endif
+
+#else
+#error Non-gcc compatible compiler
+#endif
+
+/** Page size */
+#define ODP_PAGE_SIZE 4096
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif