From patchwork Thu Dec 21 13:00:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 122559 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp852681qgn; Thu, 21 Dec 2017 05:01:43 -0800 (PST) X-Google-Smtp-Source: ACJfBovm/rdRL7ph37bo98scYtIZB0VGsVi1H+CMpCEycBDqYEm/A2aVK8Ql4YDSNY9IVT5h8dKU X-Received: by 10.237.47.228 with SMTP id m91mr15045672qtd.205.1513861303782; Thu, 21 Dec 2017 05:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513861303; cv=none; d=google.com; s=arc-20160816; b=WfYC9D7rrod2aSsPjInkaGsHtY3HPARg7RMt3bjqWinPKKMapOBlPEljCbSk8RauwN lhJq5IGU4cZh6mZcq7iii+0mJ89HtYp4ZTxefzX/Xnsj3uHu7+qwbjR9ch/0WEI8/qMG en4/nMgVEwB71dXrV/Qt6PQevsWzdEiXvIXTTFz+mC6+W1ucdt1HfYUIu5nxMEAwcQMz mkzokfLx22bFIncW5r58+U8N1hB9pbBIQfK5/zk1nZzR6tEJIjY+cLNCoiRYMJ7egzac jRoNAJOUx8hS1yTC0i4lEQbQWYu+RrufSEIEDl9q+ynh8y0eienA9yoi+C/Gx0K9DaQm ep3g== 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=FPgWuLnfp6EvC9Qb/NYHsjt0YeaHQvcZ8BDmm+fzVL4=; b=ZSR6xSDt8R2A/y8VdLL6wRSWzk6EWkWvt+n5wwRcwXE28HXWr0PDWmyhbte/KgrL/Q REmfYFcRMyCe4oew/qG+j1uT4YS5wzpU8LIWQfoamBPwJ1zpZbaFJdO0BSPN3udfSbs7 KZpV8N/Ay5NFMpAtbmPgqIG+Y+2Bagd0/VetZd+hBkKhYR40OWDF/Rw/h7uvs6H9Zhc6 sjACFFiCVq3F/NrVLujN1Fm18VcOO8SKF/zvQCl5Jsg1DL0C8Yl513h11+9sVJYMG6hw /auT8bi4LwXl82wZBAMsadY5CdTX1MajaPYLT8MtPm808wfS5CE5dNpa0PwqlgfqIXl0 u4oQ== 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 x3si2662592qkl.94.2017.12.21.05.01.43; Thu, 21 Dec 2017 05:01:43 -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 79E8C60B4F; Thu, 21 Dec 2017 13:01:43 +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_H2, URIBL_BLOCKED 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 85D296096B; Thu, 21 Dec 2017 13:01:13 +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 C34D860A6E; Thu, 21 Dec 2017 13:01:04 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id BBB7860940 for ; Thu, 21 Dec 2017 13:00:37 +0000 (UTC) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward101p.mail.yandex.net (Yandex) with ESMTP id B45716A81B55 for ; Thu, 21 Dec 2017 16:00:36 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6S0Xd1ad2u-0aa8cXsH; Thu, 21 Dec 2017 16:00:36 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id A7lll3EN3S-0ZmCSjIU; Thu, 21 Dec 2017 16:00:36 +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: Thu, 21 Dec 2017 16:00:08 +0300 Message-Id: <1513861209-18790-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513861209-18790-1-git-send-email-odpbot@yandex.ru> References: <1513861209-18790-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 358 Subject: [lng-odp] [PATCH v1 2/3] linux-gen: arch: cpu arch specific time header 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: Petri Savolainen Rename odp_time_internal.h to odp_arch_time_internal.h, and move it under arch directory. This header specifies internal CPU arch specific time counter functions. All architectures must implement these functions. Signed-off-by: Petri Savolainen --- /** Email created from pull request 358 (psavol:master-arch-dir-cleanup) ** https://github.com/Linaro/odp/pull/358 ** Patch: https://github.com/Linaro/odp/pull/358.patch ** Base sha: 6b5cdc77eb9759a2349b10372a964648559bc92c ** Merge commit sha: 93353441d4d0b5d0d679401db0daaef8f7f26ee1 **/ platform/linux-generic/Makefile.am | 3 ++- platform/linux-generic/arch/aarch64/odp_global_time.c | 2 +- platform/linux-generic/arch/default/odp_global_time.c | 13 +------------ platform/linux-generic/arch/mips64/odp_cpu_arch.c | 1 - .../odp_time_internal.h => arch/odp_arch_time_internal.h} | 4 ++-- platform/linux-generic/arch/x86/cpu_flags.c | 2 +- platform/linux-generic/arch/x86/odp_global_time.c | 2 +- platform/linux-generic/odp_time.c | 2 +- 8 files changed, 9 insertions(+), 20 deletions(-) rename platform/linux-generic/{include/odp_time_internal.h => arch/odp_arch_time_internal.h} (82%) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index bbe6a21c2..d1b916292 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -5,6 +5,7 @@ include $(top_srcdir)/platform/Makefile.inc AM_CPPFLAGS = -I$(srcdir)/include AM_CPPFLAGS += -I$(top_srcdir)/include +AM_CPPFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ AM_CPPFLAGS += -I$(top_builddir)/include AM_CPPFLAGS += -Iinclude @@ -115,6 +116,7 @@ nodist_odpapiplatinclude_HEADERS = \ include/odp/api/plat/static_inline.h noinst_HEADERS = \ + arch/odp_arch_time_internal.h \ include/_fdserver_internal.h \ include/_ishm_internal.h \ include/_ishmphy_internal.h \ @@ -150,7 +152,6 @@ noinst_HEADERS = \ include/odp_schedule_if.h \ include/odp_sorted_list_internal.h \ include/odp_shm_internal.h \ - include/odp_time_internal.h \ include/odp_timer_internal.h \ include/odp_timer_wheel_internal.h \ include/odp_traffic_mngr_internal.h \ diff --git a/platform/linux-generic/arch/aarch64/odp_global_time.c b/platform/linux-generic/arch/aarch64/odp_global_time.c index 97444f7e9..a1b48ea00 100644 --- a/platform/linux-generic/arch/aarch64/odp_global_time.c +++ b/platform/linux-generic/arch/aarch64/odp_global_time.c @@ -11,7 +11,7 @@ #include #include -#include +#include int cpu_has_global_time(void) { diff --git a/platform/linux-generic/arch/default/odp_global_time.c b/platform/linux-generic/arch/default/odp_global_time.c index 89cce1cfb..ae8a6bbda 100644 --- a/platform/linux-generic/arch/default/odp_global_time.c +++ b/platform/linux-generic/arch/default/odp_global_time.c @@ -4,18 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include "config.h" - -#include - -#include -#include - -#include -#include -#include -#include -#include +#include int cpu_has_global_time(void) { diff --git a/platform/linux-generic/arch/mips64/odp_cpu_arch.c b/platform/linux-generic/arch/mips64/odp_cpu_arch.c index 620a01044..50ffc2e77 100644 --- a/platform/linux-generic/arch/mips64/odp_cpu_arch.c +++ b/platform/linux-generic/arch/mips64/odp_cpu_arch.c @@ -9,7 +9,6 @@ #include #include #include -#include uint64_t odp_cpu_cycles(void) { diff --git a/platform/linux-generic/include/odp_time_internal.h b/platform/linux-generic/arch/odp_arch_time_internal.h similarity index 82% rename from platform/linux-generic/include/odp_time_internal.h rename to platform/linux-generic/arch/odp_arch_time_internal.h index 99ac79772..ce27101d6 100644 --- a/platform/linux-generic/include/odp_time_internal.h +++ b/platform/linux-generic/arch/odp_arch_time_internal.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef ODP_TIME_INTERNAL_H_ -#define ODP_TIME_INTERNAL_H_ +#ifndef ODP_ARCH_TIME_INTERNAL_H_ +#define ODP_ARCH_TIME_INTERNAL_H_ #ifdef __cplusplus extern "C" { diff --git a/platform/linux-generic/arch/x86/cpu_flags.c b/platform/linux-generic/arch/x86/cpu_flags.c index e46c4ffb6..fd8806462 100644 --- a/platform/linux-generic/arch/x86/cpu_flags.c +++ b/platform/linux-generic/arch/x86/cpu_flags.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/platform/linux-generic/arch/x86/odp_global_time.c b/platform/linux-generic/arch/x86/odp_global_time.c index 3ed243cc6..c372f0890 100644 --- a/platform/linux-generic/arch/x86/odp_global_time.c +++ b/platform/linux-generic/arch/x86/odp_global_time.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include uint64_t cpu_global_time(void) { diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 0df4682c3..1ec57c7cd 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include