From patchwork Wed Jan 20 09:20:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60023 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3068892lbb; Wed, 20 Jan 2016 01:41:52 -0800 (PST) X-Received: by 10.55.23.168 with SMTP id 40mr16361315qkx.7.1453282912316; Wed, 20 Jan 2016 01:41:52 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k65si42865150qgf.53.2016.01.20.01.41.51; Wed, 20 Jan 2016 01:41:52 -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 C9C4E61105; Wed, 20 Jan 2016 09:41:51 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=PH/uqFmg; 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 23617617AA; Wed, 20 Jan 2016 09:36:46 +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 706606177C; Wed, 20 Jan 2016 09:36:35 +0000 (UTC) Received: from mail-pf0-f175.google.com (mail-pf0-f175.google.com [209.85.192.175]) by lists.linaro.org (Postfix) with ESMTPS id ED6F461785 for ; Wed, 20 Jan 2016 09:35:40 +0000 (UTC) Received: by mail-pf0-f175.google.com with SMTP id 65so1997191pff.2 for ; Wed, 20 Jan 2016 01:35:40 -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=fndvPzwSBklclohTAFxByNDJAKtgIZaM/TENhDfwBNY=; b=PH/uqFmgt9O5aHXcCqDrRNzIniJhPO4cGB8NSXRuy2bkaEM1Sdh/eiVlRDcTdC1Kko 5eC0711m/Lw3oXCQiJvGqeELrKPD85gbJuUdKVwjCIkImt+OxVdiCyYvfSKTGz7TL8Tf bJYjHUuWhIiECRa7hxTG/J3hb0dbGyhXdvAN8= 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=fndvPzwSBklclohTAFxByNDJAKtgIZaM/TENhDfwBNY=; b=d+bfDU8NcfRc4/nlvHwDGpkf4JpWnuVJQuYlO6FYu6vBMOju+DM7STcAOBoetyA3tW EQm/ImfJSEF8aOAgwg4DXGF85XEdeGrf3VJI3zzvbQyg5eiWT+2dZY4pyJZivM8x0FY9 SIxNy73o4mvyzyO97UXPnYTXOOROPB6JdcfFKJHCCeUgYrum81YOM9m81N68xBkZMLWX fXR+soOK5yj1wB5CVAYc3iUDx5XILELI7QG8n45L77lMD4ymVsqPzarWlu5vnU7aaXnN NDZj4Ieh8UmXfp80IghMpp5G9i3amXvsbLjt+VHKYFMsM673TFhJyczcTrOzldYq5I8S Gt/Q== X-Gm-Message-State: ALoCoQkWR72JPvlWWAZHlfMhLFoBif57PFG33qjVSb6IJwC2LPeGvZZN0+T9tQo2OL33ltHk6NA6GcszO5px/UxJu6hcWjuaFA== X-Received: by 10.98.16.65 with SMTP id y62mr51707692pfi.138.1453282540374; Wed, 20 Jan 2016 01:35:40 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jan 2016 01:35:39 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Wed, 20 Jan 2016 17:20:59 +0800 Message-Id: <1453281662-31499-10-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 09/12] linux-generic: sysinfo: set values for cpu_arch_str 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 The values of cpu_arch_str were deleted due to codes reorganization, this patch adds values to them again. Signed-off-by: Hongbo Zhang --- platform/linux-generic/arch/mips64/odp_sysinfo_parse.c | 1 + platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c | 1 + platform/linux-generic/arch/x86/odp_sysinfo_parse.c | 1 + 3 files changed, 3 insertions(+) diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c index b6e0e2c..dcecbb9 100644 --- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c @@ -15,6 +15,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) int model = 0; int count = 2; + strcpy(sysinfo->cpu_arch_str, "mips64"); while (fgets(str, sizeof(str), file) != NULL && count > 0) { if (!mhz) { pos = strstr(str, "BogoMIPS"); diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c index 83d88ca..1ed95ad 100644 --- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c @@ -15,6 +15,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) int model = 0; int count = 2; + strcpy(sysinfo->cpu_arch_str, "powerpc"); while (fgets(str, sizeof(str), file) != NULL && count > 0) { if (!mhz) { pos = strstr(str, "clock"); diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c index 831a53a..d2b3c80 100644 --- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c @@ -15,6 +15,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) uint64_t hz; int id = 0; + strcpy(sysinfo->cpu_arch_str, "x86"); while (fgets(str, sizeof(str), file) != NULL && id < MAX_CPU_NUMBER) { pos = strstr(str, "model name"); if (pos) {