From patchwork Fri Dec 25 08:30:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 58996 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp214274lbb; Fri, 25 Dec 2015 00:34:27 -0800 (PST) X-Received: by 10.107.168.203 with SMTP id e72mr39514060ioj.96.1451032466141; Fri, 25 Dec 2015 00:34:26 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h64si26776686ioh.72.2015.12.25.00.34.25; Fri, 25 Dec 2015 00:34:26 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 72A286166B; Fri, 25 Dec 2015 08:34:25 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=WrF4W2vX; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,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 0E5CE616E5; Fri, 25 Dec 2015 08:31:29 +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 054C7616E3; Fri, 25 Dec 2015 08:31:21 +0000 (UTC) Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by lists.linaro.org (Postfix) with ESMTPS id 6FB76616D6 for ; Fri, 25 Dec 2015 08:30:29 +0000 (UTC) Received: by mail-pf0-f172.google.com with SMTP id e65so25781055pfe.1 for ; Fri, 25 Dec 2015 00:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tl+LQ4rrqUmouq3awJ0iolyjSS1mqSkJP0+LP4p0xxM=; b=WrF4W2vXL97bNvPt7soo3FSlpNq3pNIOa4Y58jAsCWDqf5/a+945irojFaYQihNwzs 6mVsZKZ8II24IyS2MmpzXIFn/yg7YYDOMtdzb0osckiyu9wezZnx0EAHbWRQ0jzgxDDK VKQl+YBMDJKIvg3q/wBbWVd3UnzvJUk99e/BY= 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=Tl+LQ4rrqUmouq3awJ0iolyjSS1mqSkJP0+LP4p0xxM=; b=mGlGTHxsumsExAz4y9mvZ4CFOtk/IHtn2Mc0JSQYk3aevRKzazk9XWGE3Uku8L3uak 0nXXTccGfPzeHftEvxaWm9KO/D7/P/PpJGJTLxwonH3fSwgxpunTBA1SyTYpzxG46Iix /aARa8/+ZqYA8parKeb+XGToJqci8rs78r5w26YTB8OZOPxdGtDPFr89/7VMbWLQGE3p KNmLVfp5c5RpHTuGGAHT13fCIMvtGXvSlgG+YgXyHUid5sP5zpHFyrlzFIBfoEgop+Z0 shbOxTFue8mdovjeqyoKVW25C3Vit0PT3ejWWoki//ZXrUBAQ/k64pCjnFac92xx4v6g yqnA== X-Gm-Message-State: ALoCoQngvONdis0lMR2eCn3VLvu1/2D1kstt96OnXFg39g0qisAJdSD8Nrxn2X6GYLTb/LLXtliOBCl1cvAHSXkYbmm7EPjdWg== X-Received: by 10.98.71.78 with SMTP id u75mr9667454pfa.65.1451032228791; Fri, 25 Dec 2015 00:30:28 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id p80sm33503452pfi.12.2015.12.25.00.30.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Dec 2015 00:30:28 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 25 Dec 2015 16:30:00 +0800 Message-Id: <1451032201-19954-7-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1451032201-19954-1-git-send-email-hongbo.zhang@linaro.org> References: <1451032201-19954-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH API-NEXT 6/7] linux-generic: sysinfo: move arm system info codes to its plarform file 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Hongbo Zhang This patch moves the arm system info codes into the newly added arm specific platform file. Signed-off-by: Hongbo Zhang --- configure.ac | 1 + platform/linux-generic/Makefile.am | 1 + platform/linux-generic/arch/arm/odp_sysinfo_parse.c | 20 ++++++++++++++++++++ platform/linux-generic/odp_system_info.c | 15 +-------------- 4 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 platform/linux-generic/arch/arm/odp_sysinfo_parse.c diff --git a/configure.ac b/configure.ac index 4f89f03..c7115d4 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,7 @@ AX_VALGRIND_CHECK ########################################################################## AS_CASE([$host], [x86*], [ARCH=x86], + [arm*], [ARCH=arm], [mips64*], [ARCH=mips64], [ARCH=linux] ) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index bb0faf0..0ddc9e3 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -162,6 +162,7 @@ __LIB__libodp_la_SOURCES = \ arch/@ARCH@/odp_sysinfo_parse.c EXTRA_DIST = \ + arch/arm/odp_sysinfo_parse.c \ arch/linux/odp_cpu_cycles.c \ arch/mips64/odp_cpu_cycles.c \ arch/mips64/odp_sysinfo_parse.c \ diff --git a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c new file mode 100644 index 0000000..ba792b2 --- /dev/null +++ b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c @@ -0,0 +1,20 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include + +int odp_cpuinfo_parser(FILE *file ODP_UNUSED, +odp_system_info_t *sysinfo ODP_UNUSED) +{ + return 0; +} + +uint64_t odp_cpu_hz_current(int id ODP_UNUSED) +{ + return -1; +} diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 8a151eb..158a6b9 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -109,20 +109,7 @@ static int huge_page_size(void) /* * HW specific /proc/cpuinfo file parsing */ -#if defined __arm__ || defined __aarch64__ - -static int odp_cpuinfo_parser(FILE *file ODP_UNUSED, -odp_system_info_t *sysinfo ODP_UNUSED) -{ - return 0; -} - -static uint64_t odp_cpu_hz_current(int id ODP_UNUSED) -{ - return -1; -} - -#elif defined __powerpc__ +#if defined __powerpc__ static int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) { char str[1024];