@@ -119,6 +119,26 @@ then
fi
##########################################################################
+# Architecture for ABI support
+##########################################################################
+AS_CASE([$host],
+ [x86*], [ARCH_ABI=x86_64-linux],
+ [i686*], [ARCH_ABI=x86_32-linux],
+ [mips64*], [ARCH_ABI=mips64-linux],
+ [powerpc*], [ARCH_ABI=power64-linux],
+ [aarch64*], [ARCH_ABI=arm64-linux],
+ [arm*], [ARCH_ABI=arm32-linux],
+ [ARCH_ABI=undefined]
+)
+AC_SUBST([ARCH_ABI])
+
+if test "${ARCH_ABI}" == "undefined";
+then
+ echo "ARCH_ABI is undefined, please add your ARCH_ABI based on host=${host}"
+ exit 1
+fi
+
+##########################################################################
# Set correct pkgconfig version
##########################################################################
PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
@@ -343,7 +363,9 @@ AC_MSG_RESULT([
Helper Library version: ${ODPHELPER_LIBSO_VERSION}
implementation_name: ${IMPLEMENTATION_NAME}
+ host: ${host}
ARCH_DIR ${ARCH_DIR}
+ ARCH_ABI ${ARCH_ABI}
with_platform: ${with_platform}
with_helper_platform: ${with_helper_platform}
helper_extn: ${helper_extn}
@@ -6,6 +6,7 @@ AM_CFLAGS += \
-I$(top_srcdir)/example \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_srcdir)/include/ \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/helper/include \
-I$(top_builddir)/platform/@with_platform@/include \
-I$(top_builddir)/include
@@ -7,6 +7,7 @@ LIB = $(top_builddir)/lib
AM_CFLAGS += -I$(srcdir)/include
AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
AM_CFLAGS += -I$(top_srcdir)/include
+AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include
AM_CFLAGS += -I$(top_builddir)/include
@@ -12,6 +12,7 @@ INCFLAGS = \
-I$(top_srcdir)/helper/include \
-I$(top_srcdir)/helper/platform/@with_helper_platform@/include \
-I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/helper
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/event.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/event.h>
new file mode 100644
@@ -0,0 +1,42 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_EVENT_H_
+#define ODP_ABI_EVENT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_event_t;
+
+/** @ingroup odp_event
+ * @{
+ */
+
+typedef _odp_abi_event_t *odp_event_t;
+
+#define ODP_EVENT_INVALID ((odp_event_t)0xffffffff)
+
+typedef enum odp_event_type_t {
+ ODP_EVENT_BUFFER = 1,
+ ODP_EVENT_PACKET = 2,
+ ODP_EVENT_TIMEOUT = 3,
+ ODP_EVENT_CRYPTO_COMPL = 4
+} odp_event_type_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/event.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/event.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/event.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/event.h>
@@ -60,6 +60,14 @@ odpapispecinclude_HEADERS = \
$(top_builddir)/include/odp/api/spec/version.h \
$(top_srcdir)/include/odp/api/spec/traffic_mngr.h
+odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
+odpapiabidefaultinclude_HEADERS = \
+ $(top_srcdir)/include/odp/arch/default/api/abi/event.h
+
+odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi
+odpapiabiarchinclude_HEADERS = \
+ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/event.h
+
EXTRA_DIST = \
arch/arm/odp/api/cpu_arch.h \
arch/arm/odp_cpu_arch.c \
@@ -6,6 +6,7 @@ include $(top_srcdir)/platform/@with_platform@/Makefile.inc
AM_CFLAGS += -I$(srcdir)/include
AM_CFLAGS += -I$(top_srcdir)/include
+AM_CFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
AM_CFLAGS += -I$(top_builddir)/include
AM_CFLAGS += -Iinclude
@@ -18,11 +18,15 @@
extern "C" {
#endif
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/event.h>
+#else
+
#include <odp/api/std_types.h>
#include <odp/api/plat/strong_types.h>
-/** @defgroup odp_event ODP EVENT
- * Operations on an event.
+/** @ingroup odp_event
* @{
*/
@@ -30,9 +34,6 @@ typedef ODP_HANDLE_T(odp_event_t);
#define ODP_EVENT_INVALID _odp_cast_scalar(odp_event_t, 0xffffffff)
-/**
- * Event types
- */
typedef enum odp_event_type_t {
ODP_EVENT_BUFFER = 1,
ODP_EVENT_PACKET = 2,
@@ -40,16 +41,12 @@ typedef enum odp_event_type_t {
ODP_EVENT_CRYPTO_COMPL = 4,
} odp_event_type_t;
-/** Get printable format of odp_event_t */
-static inline uint64_t odp_event_to_u64(odp_event_t hdl)
-{
- return _odp_pri(hdl);
-}
-
/**
* @}
*/
+#endif
+
#ifdef __cplusplus
}
#endif
@@ -38,3 +38,8 @@ void odp_event_free(odp_event_t event)
ODP_ABORT("Invalid event type: %d\n", odp_event_type(event));
}
}
+
+uint64_t odp_event_to_u64(odp_event_t hdl)
+{
+ return _odp_pri(hdl);
+}
@@ -10,6 +10,7 @@ INCFLAGS = \
-I$(top_builddir)/platform/@with_platform@/include \
-I$(top_srcdir)/helper/include \
-I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_srcdir)/test \
-I$(top_builddir)/include
@@ -14,6 +14,7 @@ INCODP = \
-I$(top_builddir)/platform/@with_platform@/include \
-I$(top_srcdir)/helper/include \
-I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
-I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_srcdir)/test
Used event API as the first example of an ABI spec file. Used the same default architecture file initially for all architectures. Default ABI files avoid multiple copies of the same definition. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- configure.ac | 22 ++++++++++++ example/Makefile.inc | 1 + helper/Makefile.am | 1 + helper/test/Makefile.am | 1 + include/odp/arch/arm32-linux/odp/api/abi/event.h | 7 ++++ include/odp/arch/arm64-linux/odp/api/abi/event.h | 7 ++++ include/odp/arch/default/api/abi/event.h | 42 ++++++++++++++++++++++ include/odp/arch/mips64-linux/odp/api/abi/event.h | 7 ++++ include/odp/arch/power64-linux/odp/api/abi/event.h | 7 ++++ include/odp/arch/x86_32-linux/odp/api/abi/event.h | 7 ++++ include/odp/arch/x86_64-linux/odp/api/abi/event.h | 7 ++++ platform/Makefile.inc | 8 +++++ platform/linux-generic/Makefile.am | 1 + .../include/odp/api/plat/event_types.h | 19 +++++----- platform/linux-generic/odp_event.c | 5 +++ test/Makefile.inc | 1 + test/linux-generic/Makefile.inc | 1 + 17 files changed, 133 insertions(+), 11 deletions(-) create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/event.h create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/event.h create mode 100644 include/odp/arch/default/api/abi/event.h create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/event.h create mode 100644 include/odp/arch/power64-linux/odp/api/abi/event.h create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/event.h create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/event.h -- 2.8.1