From patchwork Thu Aug 4 19:30:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Brooks X-Patchwork-Id: 73310 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1560630qga; Thu, 4 Aug 2016 12:33:25 -0700 (PDT) X-Received: by 10.55.101.71 with SMTP id z68mr8710868qkb.189.1470339205067; Thu, 04 Aug 2016 12:33:25 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f35si901629qki.181.2016.08.04.12.33.24; Thu, 04 Aug 2016 12:33:25 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2E84460805; Thu, 4 Aug 2016 19:33:24 +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, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 6B5BA6080E; Thu, 4 Aug 2016 19:30:54 +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 6197560804; Thu, 4 Aug 2016 19:30:47 +0000 (UTC) Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by lists.linaro.org (Postfix) with ESMTPS id E399060802 for ; Thu, 4 Aug 2016 19:30:17 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id j185so334529282oih.0 for ; Thu, 04 Aug 2016 12:30:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9SM9FBFgnmBqajpabz8GL15j//dm8CoY81Bu9gjtv9k=; b=KdPrTScX3HBUMx/mMpjzkBKL5jK+st1ft5T9d/XXGtZGfcGTZt+SbO8RPiTpkMjOC/ DVZ1IagTtT9izroi70FXxuWCSeL1xq75gNhPxQHoNb4R4H1y71grl9/5rCcdFVIoQwsP yjmpFdWEDT+FW7YW6u6nCqQO5bTtxWubBgLklq09MLP1w4H95y8lh2lp2yLXXv8o7juG L4BA4c7yzOrtstd9t26mk47PtPFSUf91pnvhs6u8XyF3MmPlxDe3NN9g5crNr9z3TrLR vrSh+F6vZJ2nrL3iX9hn3Qqdoe7D8qdnKoIqJsCRza5gWVb6X7JZrLZytLlMtT9esWC7 zZEw== X-Gm-Message-State: AEkoouugHy8PPLcdqUHn7HHkQRFevBQQgDZ69lphgb3NyGYaVvEGVVaM1ANup78JcwL5Slk4nFw= X-Received: by 10.202.64.138 with SMTP id n132mr45884804oia.2.1470339017371; Thu, 04 Aug 2016 12:30:17 -0700 (PDT) Received: from localhost.localdomain (adsl-68-248-140-212.dsl.applwi.ameritech.net. [68.248.140.212]) by smtp.gmail.com with ESMTPSA id o185sm6883540oif.26.2016.08.04.12.30.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 12:30:16 -0700 (PDT) From: Brian Brooks To: lng-odp@lists.linaro.org Date: Thu, 4 Aug 2016 14:30:06 -0500 Message-Id: <20160804193006.99010-6-brian.brooks@linaro.org> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160804193006.99010-1-brian.brooks@linaro.org> References: <20160804193006.99010-1-brian.brooks@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 6/6] linux-generic: internal odp_cpu_hz_current() 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" Prefix odp_cpu_hz_current with '_' to be consistent with other internal cpu definitions in arch directory. Signed-off-by: Brian Brooks --- platform/linux-generic/arch/default/odp_sysinfo_parse.c | 3 ++- platform/linux-generic/arch/mips64/odp_sysinfo_parse.c | 3 ++- platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c | 3 ++- platform/linux-generic/arch/x86/odp_sysinfo_parse.c | 3 ++- platform/linux-generic/include/odp_cpu_internal.h | 1 + platform/linux-generic/include/odp_internal.h | 1 - platform/linux-generic/odp_system_info.c | 5 +++-- 7 files changed, 12 insertions(+), 7 deletions(-) -- 2.9.2 diff --git a/platform/linux-generic/arch/default/odp_sysinfo_parse.c b/platform/linux-generic/arch/default/odp_sysinfo_parse.c index 53e2aae..cae6d19 100644 --- a/platform/linux-generic/arch/default/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/default/odp_sysinfo_parse.c @@ -5,6 +5,7 @@ */ #include +#include #include #include @@ -21,7 +22,7 @@ int cpuinfo_parser(FILE *file ODP_UNUSED, system_info_t *sysinfo) return 0; } -uint64_t odp_cpu_hz_current(int id ODP_UNUSED) +uint64_t _odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c index 407264b..d452653 100644 --- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include @@ -58,7 +59,7 @@ int cpuinfo_parser(FILE *file, system_info_t *sysinfo) return 0; } -uint64_t odp_cpu_hz_current(int id ODP_UNUSED) +uint64_t _odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c index 3b88d55..b877059 100644 --- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include @@ -57,7 +58,7 @@ int cpuinfo_parser(FILE *file, system_info_t *sysinfo) return 0; } -uint64_t odp_cpu_hz_current(int id ODP_UNUSED) +uint64_t _odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c index 96127ec..8e013a9 100644 --- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include @@ -38,7 +39,7 @@ int cpuinfo_parser(FILE *file, system_info_t *sysinfo) return 0; } -uint64_t odp_cpu_hz_current(int id) +uint64_t _odp_cpu_hz_current(int id) { char str[1024]; FILE *file; diff --git a/platform/linux-generic/include/odp_cpu_internal.h b/platform/linux-generic/include/odp_cpu_internal.h index 351d430..8511f86 100644 --- a/platform/linux-generic/include/odp_cpu_internal.h +++ b/platform/linux-generic/include/odp_cpu_internal.h @@ -14,6 +14,7 @@ extern "C" { #include uint64_t _odp_cpu_cycles(void); +uint64_t _odp_cpu_hz_current(int id); #ifdef __cplusplus } diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 8bad450..646027a 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -120,7 +120,6 @@ int _odp_int_name_tbl_init_global(void); int _odp_int_name_tbl_term_global(void); int cpuinfo_parser(FILE *file, system_info_t *sysinfo); -uint64_t odp_cpu_hz_current(int id); #ifdef __cplusplus } diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index bbe5358..ddf1440 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -177,12 +178,12 @@ uint64_t odp_cpu_hz(void) { int id = sched_getcpu(); - return odp_cpu_hz_current(id); + return _odp_cpu_hz_current(id); } uint64_t odp_cpu_hz_id(int id) { - return odp_cpu_hz_current(id); + return _odp_cpu_hz_current(id); } uint64_t odp_cpu_hz_max(void)