new file mode 100644
@@ -0,0 +1,78 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODPDRV alignments
+ */
+
+#ifndef ODPDRV_API_ALIGN_H_
+#define ODPDRV_API_ALIGN_H_
+#include <odp/visibility_begin.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @addtogroup odpdrv_compiler_optim
+ * Macros that allow cache line size configuration, check that
+ * alignment is a power of two etc.
+ * @{
+ */
+
+/* Checkpatch complains, but cannot use __aligned(size) for this purpose. */
+
+/**
+ * @def ODPDRV_ALIGNED
+ * Defines type/struct/variable alignment in bytes
+ */
+
+/**
+ * @def ODPDRV_PACKED
+ * Defines type/struct to be packed
+ */
+
+/**
+ * @def ODPDRV_OFFSETOF
+ * Returns offset of member in type
+ */
+
+/**
+ * @def ODPDRV_FIELD_SIZEOF
+ * Returns sizeof member
+ */
+
+/**
+ * @def ODPDRV_CACHE_LINE_SIZE
+ * Cache line size
+ */
+
+/**
+ * @def ODPDRV_PAGE_SIZE
+ * Page size
+ */
+
+/**
+ * @def ODPDRV_ALIGNED_CACHE
+ * Defines type/struct/variable to be cache line size aligned
+ */
+
+/**
+ * @def ODPDRV_ALIGNED_PAGE
+ * Defines type/struct/variable to be page size aligned
+ */
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <odp/visibility_end.h>
+#endif
@@ -63,6 +63,7 @@ odpapispecinclude_HEADERS = \
odpdrvspecincludedir= $(includedir)/odp/drv/spec
odpdrvspecinclude_HEADERS = \
+ $(top_srcdir)/include/odp/drv/spec/align.h \
$(top_srcdir)/include/odp/drv/spec/byteorder.h \
$(top_srcdir)/include/odp/drv/spec/compiler.h \
$(top_srcdir)/include/odp/drv/spec/std_types.h \
Based on API interface file. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- include/odp/drv/spec/align.h | 78 ++++++++++++++++++++++++++++++++++++++++++++ platform/Makefile.inc | 1 + 2 files changed, 79 insertions(+) create mode 100644 include/odp/drv/spec/align.h -- 2.7.4