From patchwork Wed Jan 20 09:20:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60019 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3068023lbb; Wed, 20 Jan 2016 01:39:46 -0800 (PST) X-Received: by 10.140.81.80 with SMTP id e74mr43575206qgd.27.1453282786534; Wed, 20 Jan 2016 01:39:46 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a65si27018532qga.23.2016.01.20.01.39.46; Wed, 20 Jan 2016 01:39:46 -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 16E8D610E1; Wed, 20 Jan 2016 09:39:46 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=QPTLIc+P; 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_H3, RCVD_IN_MSPIKE_WL, 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 7949C6177C; Wed, 20 Jan 2016 09:36:36 +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 E39B8617A0; Wed, 20 Jan 2016 09:36:29 +0000 (UTC) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by lists.linaro.org (Postfix) with ESMTPS id 2633461105 for ; Wed, 20 Jan 2016 09:35:34 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id uo6so2079611pac.1 for ; Wed, 20 Jan 2016 01:35:34 -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=zQ7piXOK9TiSMxcaQb2lBaSPiM00F6iSxZEv2C3FJyQ=; b=QPTLIc+PbjSRwGL4bo4x0GX1EpYeb7OY7nFATmTZwRBXGVX2NcVbOpbhkAkfGD9ZFk Q1dV1c492jbHpsM2L/X72im4d1e1J7NtuCr/3hXepm4MRxs/RsAlvlhHj9l2pceitNZn xkXYzNiwopT0vXcCDX9G0a5uy4Y12p1alp+gk= 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=zQ7piXOK9TiSMxcaQb2lBaSPiM00F6iSxZEv2C3FJyQ=; b=WecTG/WDsbLedK0eQMNIcrQjL2/sqrqSpjF9DY8iYKSdVT9znhlN6eJstlkCtjc+Jb ALL++K4AwVnsMSZ0qq/olDRSSWWOPaoG+Gpfg/iBKmANkDsLnwy25GUMyv8d6e9ZRPOx 6fBZT2V7PbtKXb9xIAxyl9wqZRTYz1JuHMgGBaVm/cT2lT/zLvbR/+oJgboUsF1IXUdX aVyjmcIuYWwBoC0iqGLvgcyjJp6QSZh96gpXca4Sib1A+CjSNOcoOPwVNDiUAD2RoHru xeAPMi8VOUDiDD7dJQ9w2IhnIANsKQQfNIqz5OXs5AEjiCM2Qrg37iLD0RzAI3pK08IL W3yg== X-Gm-Message-State: ALoCoQn7JDty76+2EINtjJUjKYo9g5TcLq29eRBGawapgBktQrfTZper7McH30rsScSTdzCaKOFcBcbEFlmvunMvkhEOEKjpYw== X-Received: by 10.66.140.14 with SMTP id rc14mr51133372pab.65.1453282533500; Wed, 20 Jan 2016 01:35:33 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id xz6sm47592797pab.42.2016.01.20.01.35.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jan 2016 01:35:32 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Wed, 20 Jan 2016 17:20:56 +0800 Message-Id: <1453281662-31499-7-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453281662-31499-1-git-send-email-hongbo.zhang@linaro.org> References: <1453281662-31499-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v7 API-NEXT 06/12] linux-generic: sysinfo: move ARM system info codes to default arch 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 general arch file, ARM sysinfo isn't implemented now and there is no need to create specific arch file for it, but this can serve as the default implementaton instead. Signed-off-by: Hongbo Zhang --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/arch/linux/odp_sysinfo_parse.c | 19 +++++++++++++++++++ platform/linux-generic/odp_system_info.c | 15 +-------------- 3 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 platform/linux-generic/arch/linux/odp_sysinfo_parse.c diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index d3802f8..b737135 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -164,6 +164,7 @@ __LIB__libodp_la_SOURCES = \ EXTRA_DIST = \ arch/linux/odp_cpu_arch.c \ + arch/linux/odp_sysinfo_parse.c \ arch/mips64/odp_cpu_arch.c \ arch/mips64/odp_sysinfo_parse.c \ arch/x86/odp_cpu_arch.c \ diff --git a/platform/linux-generic/arch/linux/odp_sysinfo_parse.c b/platform/linux-generic/arch/linux/odp_sysinfo_parse.c new file mode 100644 index 0000000..881dd2d --- /dev/null +++ b/platform/linux-generic/arch/linux/odp_sysinfo_parse.c @@ -0,0 +1,19 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#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 2b8e2b8..27dad03 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -108,20 +108,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];