From patchwork Wed Feb 14 08:00:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128316 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp342325ljc; Wed, 14 Feb 2018 00:02:27 -0800 (PST) X-Google-Smtp-Source: AH8x224NilDdmYMsV/0gdz+y3A2fOMg8hRhe3PhthI9NifjFytlAJv32A3zsuwwwOMIQn34ZrYrH X-Received: by 10.55.6.1 with SMTP id 1mr6211970qkg.38.1518595347368; Wed, 14 Feb 2018 00:02:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518595347; cv=none; d=google.com; s=arc-20160816; b=CLzAMkO5kYC3ICfGm8LUF+HDETXtvxo29baJI7EyU1q7OKpAk0wgUzIF+O0+GLyD7V pqtOOG/C/obeItBi8oIw8t7TctTioB6u5+rDTcqsVmomu6sq57ZgsQvBdMAp6ap9C4sh T0CzXcTShpQHV1ZivdOC7WADMTqprcMv9hzhERvfP/GVXfBGLs3YTMU4uCYooizaVcBv nm7pWH1c/4FanlBhRSEzgl98im1UoGsAqTLLAKvYctk05wnFV7bS2z+TCedvXO5rPqdN xhtoZPrHLRrMz3R1SVP20oJ6Pczw/l2IG0ALoYedJj4NguIWDTZ84Bt8bx82FwGfbkaB Mxmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=WOJDUD8LqU6+oGu0PuhkPbmBSNl60bbsq4iQXXNc0eE=; b=QAzSVkENR44IxMP4a1YDzSwGSOPrt6rx01sYR61KoNh7mfI/JKgrGJLsWQwsUWoOjF OC+rxeFW+08vZL/8mNtSEtk/7zHyf4i60H9Q3+Zkm/nNQCdGDHmii/qGuDibk7HgeKSk IKFADaGPUZXmVsjC3a0wNqzINVDdfbAEHOCi0JGIvha9itBoVmxgnch3vUC82AuTZi+1 kZBm+2RfzXqs6cLgU1jWqVOdB4darVOwxvgoiwXVNA/b7elKhL5sj3KaEXCDOx5foAUb JRSvfquSOaCAO/X/7CU3Btei5p/jqylRDGOIO9WakuJRC1a5KwI/Yj1FeUOB+wEH1FAt Pnaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id v1si4199193qtv.406.2018.02.14.00.02.26; Wed, 14 Feb 2018 00:02:27 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id D2B87617D7; Wed, 14 Feb 2018 08:02:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id BBE49616DF; Wed, 14 Feb 2018 08:00:49 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E8BE1614E1; Wed, 14 Feb 2018 08:00:40 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id D1D92614E1 for ; Wed, 14 Feb 2018 08:00:24 +0000 (UTC) Received: from mxback4o.mail.yandex.net (mxback4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1e]) by forward103j.mail.yandex.net (Yandex) with ESMTP id A176F34C2F3C for ; Wed, 14 Feb 2018 11:00:22 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback4o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yZxdhIJpmQ-0ML0stXW; Wed, 14 Feb 2018 11:00:22 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Y4JUh4BhDF-0LZmnDRv; Wed, 14 Feb 2018 11:00:21 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 14 Feb 2018 11:00:15 +0300 Message-Id: <1518595221-854-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518595221-854-1-git-send-email-odpbot@yandex.ru> References: <1518595221-854-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 462 Subject: [lng-odp] [PATCH v1 1/7] build: support building for generic arch X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Support building ODP for generic architecture, using default ARCH code. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 462 (lumag:default-abi) ** https://github.com/Linaro/odp/pull/462 ** Patch: https://github.com/Linaro/odp/pull/462.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: 92a3ed64c30441cbca76e6f8ab5c086fe0c83a18 **/ configure.ac | 8 ++++---- platform/linux-generic/Makefile.am | 10 +++++++++ .../linux-generic/arch/default/odp/api/abi/cpu.h | 24 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 platform/linux-generic/arch/default/odp/api/abi/cpu.h diff --git a/configure.ac b/configure.ac index a44a2ec6f..97f0af400 100644 --- a/configure.ac +++ b/configure.ac @@ -159,17 +159,16 @@ AS_CASE([$host], [powerpc*], [ARCH_DIR=powerpc], [aarch64*], [ARCH_DIR=aarch64], [arm*], [ARCH_DIR=arm], - [ARCH_DIR=undefined] + [ARCH_DIR=default] ) AC_SUBST([ARCH_DIR]) ########################################################################## # Warn on the defaults if arch is undefined ########################################################################## -if test "${ARCH_DIR}" = "undefined"; +if test "${ARCH_DIR}" = "default"; then - echo "ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}" - exit 1 + AC_MSG_WARN([ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}]) fi ########################################################################## @@ -280,6 +279,7 @@ AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) AM_CONDITIONAL([helper_linux], [test x$helper_linux = xyes ]) AM_CONDITIONAL([ARCH_IS_ARM], [test "x${ARCH_DIR}" = "xarm"]) AM_CONDITIONAL([ARCH_IS_AARCH64], [test "x${ARCH_DIR}" = "xaarch64"]) +AM_CONDITIONAL([ARCH_IS_DEFAULT], [test "x${ARCH_DIR}" = "xdefault"]) AM_CONDITIONAL([ARCH_IS_MIPS64], [test "x${ARCH_DIR}" = "xmips64"]) AM_CONDITIONAL([ARCH_IS_POWERPC], [test "x${ARCH_DIR}" = "xpowerpc"]) AM_CONDITIONAL([ARCH_IS_X86], [test "x${ARCH_DIR}" = "xx86"]) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 9e82f2622..bb5bc8134 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -241,6 +241,16 @@ noinst_HEADERS += arch/aarch64/odp_atomic.h \ arch/default/odp_cpu_idling.h \ arch/aarch64/odp_llsc.h endif +if ARCH_IS_DEFAULT +__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_cycles.c \ + arch/default/odp_global_time.c \ + arch/default/odp_sysinfo_parse.c +if !ODP_ABI_COMPAT +odpapiabiarchinclude_HEADERS += arch/default/odp/api/abi/cpu.h +endif +noinst_HEADERS += arch/default/odp_cpu.h \ + arch/default/odp_cpu_idling.h +endif if ARCH_IS_MIPS64 __LIB__libodp_linux_la_SOURCES += arch/mips64/odp_cpu_cycles.c \ arch/default/odp_global_time.c \ diff --git a/platform/linux-generic/arch/default/odp/api/abi/cpu.h b/platform/linux-generic/arch/default/odp/api/abi/cpu.h new file mode 100644 index 000000000..0765339b4 --- /dev/null +++ b/platform/linux-generic/arch/default/odp/api/abi/cpu.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2018, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_API_ABI_CPU_H_ +#define ODP_API_ABI_CPU_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define ODP_CACHE_LINE_SIZE 64 + +static inline void odp_cpu_pause(void) +{ +} + +#ifdef __cplusplus +} +#endif + +#endif