From patchwork Tue Aug 2 21:29:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Brooks X-Patchwork-Id: 73188 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp378191qga; Tue, 2 Aug 2016 14:32:21 -0700 (PDT) X-Received: by 10.55.134.3 with SMTP id i3mr74472286qkd.74.1470173541746; Tue, 02 Aug 2016 14:32:21 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i35si2728795qtb.125.2016.08.02.14.32.21; Tue, 02 Aug 2016 14:32:21 -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 63D2B6867B; Tue, 2 Aug 2016 21:32:21 +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_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 550DE686AA; Tue, 2 Aug 2016 21:30:38 +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 BD27E6867B; Tue, 2 Aug 2016 21:30:34 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by lists.linaro.org (Postfix) with ESMTPS id 2D70D6852E for ; Tue, 2 Aug 2016 21:29:54 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id w18so255488623oiw.3 for ; Tue, 02 Aug 2016 14:29:54 -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=kewA7op8ChiVxJJOigT9X5/IIR5T9fibwPiSVN7wolBVZ1E3+npXtPhFGpag9MJoJV 52m64T0NPwqcoFAg7CWvzLE9H3nrClsvv0DSzjgzFldS6V5w1Ox6e+0rbkYC3mTkP3u/ jhyf5BynXvR/18/ETiuuAxtkeft3ExLBYuTUT2dnXTFuIpaLu1vJGZ+76ADxzgxg3mbI 4UYWfSy5PuMod2CIHlwpD9VAXAi3Fs9h2151FYWRdCUyPkuWb7qAfyUUqrFWMEjvxvoh jgz8IHRTkQosaDYDJMNVxd4mjF9gwQ5um4oOEzRkCCb/C9CNBe3lBHW/HPIQEoaC5dpW JuDQ== X-Gm-Message-State: AEkoouu8p0bZMi/W3rFQuC/dBfzDyPBy3UNTdHvzLDXfZypVEG4teGbZJYlh/Rqepd+EprCOsFo= X-Received: by 10.202.181.198 with SMTP id e189mr34061159oif.154.1470173393664; Tue, 02 Aug 2016 14:29:53 -0700 (PDT) Received: from localhost.localdomain (68-248-140-212.lightspeed.austtx.sbcglobal.net. [68.248.140.212]) by smtp.gmail.com with ESMTPSA id 98sm2175967oth.15.2016.08.02.14.29.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2016 14:29:52 -0700 (PDT) From: Brian Brooks To: lng-odp@lists.linaro.org Date: Tue, 2 Aug 2016 16:29:44 -0500 Message-Id: <20160802212944.122603-6-brian.brooks@linaro.org> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160802212944.122603-1-brian.brooks@linaro.org> References: <20160802212944.122603-1-brian.brooks@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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)