From patchwork Wed Jan 27 08:56:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60600 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2467302lbb; Wed, 27 Jan 2016 01:19:37 -0800 (PST) X-Received: by 10.55.75.203 with SMTP id y194mr34534363qka.2.1453886377526; Wed, 27 Jan 2016 01:19:37 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l13si5200484qhl.44.2016.01.27.01.19.37; Wed, 27 Jan 2016 01:19:37 -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 1B84B617BD; Wed, 27 Jan 2016 09:19:37 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=UnmlTI3o; 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 D4474617DF; Wed, 27 Jan 2016 09:16:57 +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 5D2C9615C3; Wed, 27 Jan 2016 09:16:53 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by lists.linaro.org (Postfix) with ESMTPS id 61513615C3 for ; Wed, 27 Jan 2016 09:15:56 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id yy13so1722433pab.3 for ; Wed, 27 Jan 2016 01:15:56 -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=iB0vpzBfiAXkEcWVlYffPLymdEC2CHXnVs37VPU3iu4=; b=UnmlTI3ox4MZOxa9FyL9+oRwL4u/FPrR1Wv4AvlsveB7MkM1FvA2kWPoLqkOWbAoj2 AfemELz7GZLyDJJtiBrsZe+OFtMkCXWNi+vJkSt0296Ck941J8C4ClICSi1B7bQb2oti h8bWEc3vhgGykoUjCc4Zm45/jGF550dravom0= 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=iB0vpzBfiAXkEcWVlYffPLymdEC2CHXnVs37VPU3iu4=; b=GYUz9aqOaj6sSjuh5z9rqmYTqc4OzintHolUVWlBUI1BkR025RnvJH7CXmYlQ7hRUx oA4RoI637hWEseKitPlmSKriQJiwCCY2KwzhGEurzzuuLXanJ+qQbWOvKbF8qZyys/MB 2geOTuVHbNuF+/0ZG7wYtOWLtORNxH72Q+31CFqWwwRiG0bcbBJHQ5Bq6jQmrzr0LHt/ J+knU20ccBi2BMFa4jIBCq7/P0mtsAugqrg3B35JWXWFg/RZLThTNMzWd7OqDXHgj4/Z ghK7WKZpNtNBCObEkvbOxriXNeiaPNB87HoKijQoqdEIcisE164pcdSPkuTk1nXmsuIh vi8A== X-Gm-Message-State: AG10YOQ5QVLMxvZWqSR6KV+i5qW7KtHiAbRAwlPlSXQ3oUmDhJzcxBp4VYs6D/F0cfm4qXtLAVA= X-Received: by 10.66.193.195 with SMTP id hq3mr23290477pac.38.1453886155758; Wed, 27 Jan 2016 01:15:55 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id f27sm7407314pfj.0.2016.01.27.01.15.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jan 2016 01:15:54 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Wed, 27 Jan 2016 16:56:08 +0800 Message-Id: <1453884974-24724-7-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453884974-24724-1-git-send-email-hongbo.zhang@linaro.org> References: <1453884974-24724-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v8 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 d476ae9..f4bc58e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -166,6 +166,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 1959434..7d68c2e 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];