From patchwork Tue Jan 19 10:17:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 59969 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2484223lbb; Tue, 19 Jan 2016 02:22:03 -0800 (PST) X-Received: by 10.140.44.68 with SMTP id f62mr36736454qga.106.1453198923110; Tue, 19 Jan 2016 02:22:03 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z93si36784735qgd.106.2016.01.19.02.22.02; Tue, 19 Jan 2016 02:22:03 -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 97237616A7; Tue, 19 Jan 2016 10:22:02 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=GOHEJF07; 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 738AC61778; Tue, 19 Jan 2016 10:18:44 +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 C36EE61722; Tue, 19 Jan 2016 10:18:38 +0000 (UTC) Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by lists.linaro.org (Postfix) with ESMTPS id D971E61750 for ; Tue, 19 Jan 2016 10:17:41 +0000 (UTC) Received: by mail-pf0-f174.google.com with SMTP id n128so173051116pfn.3 for ; Tue, 19 Jan 2016 02:17:41 -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=GOHEJF0746ydN5vd9qD/OAWGCDFGjiiI3NVyWVWen3oaFnxC5thFKb9XtAtrlKF+73 eCUPjHw9g8b52H4vltif0lUqgp/od2MOUqqKN0kPMcVO9YEFvcnM8tleJrY8T78GQPPp d1AweZ3cqVXhR6G6O3Ib+CRVz77Q/QXkFQmYA= 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=GaAPBpMLZXqRS6k/ie9OEhmT+/NFW72ee+YGuP06/eO3Yli67LptSKqwHWvaCmjgnK 9insYL6k7xjWug1NSjImuEUeVY7NZ+DRCv4HCj236AzngDuYLv6wkZMzb4/Uirti71WE /LbW0JexVa1B+io8rMW2MAI0OWRp/y/ThXqp23nmr5QW778B24cqCUTcEdr0+FUA1WgG oIhI/lx2o4T6DP4Kz6cZ/27hZ2bkccBxda3LaOSbHPL3ONQJSLacgKNu7+rUhLNlSrCB 6uyTvE7EdsFjljdAuqrvm1WJ5G9D3odxuieVdbeWfRrMQVMsuVxsGQRifCK8ks2zu9Pl +4/g== X-Gm-Message-State: ALoCoQlmtbknkrdtaMhewKvDTVZsXEmtRZN+P4Eh9PlTKTCtNWn9E8F8hq37oaHA4rF4ewkNsnB/lhw6t9juTbQa6TMhU6xaHA== X-Received: by 10.98.68.132 with SMTP id m4mr42909109pfi.79.1453198661261; Tue, 19 Jan 2016 02:17:41 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id k74sm40313374pfb.30.2016.01.19.02.17.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jan 2016 02:17:40 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 19 Jan 2016 18:17:07 +0800 Message-Id: <1453198633-24365-7-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453198633-24365-1-git-send-email-hongbo.zhang@linaro.org> References: <1453198633-24365-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v6 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];