From patchwork Wed Jan 27 08:56:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 60605 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2468428lbb; Wed, 27 Jan 2016 01:22:19 -0800 (PST) X-Received: by 10.55.78.198 with SMTP id c189mr34193299qkb.95.1453886539828; Wed, 27 Jan 2016 01:22:19 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m7si2002888qhc.107.2016.01.27.01.22.19; Wed, 27 Jan 2016 01:22:19 -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 6501861566; Wed, 27 Jan 2016 09:22:19 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=X0pXXki7; 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 3D5EB61A3F; Wed, 27 Jan 2016 09:17:40 +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 E415D6193C; Wed, 27 Jan 2016 09:17:33 +0000 (UTC) Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by lists.linaro.org (Postfix) with ESMTPS id 424226193C for ; Wed, 27 Jan 2016 09:16:03 +0000 (UTC) Received: by mail-pf0-f182.google.com with SMTP id q63so1824621pfb.1 for ; Wed, 27 Jan 2016 01:16:03 -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=X0pXXki7A+dxi2VfCZTHaaFeO9PWzJNa6YZAc9EaPLCksdF9N+ML6K5a8m/K3TYPFd W5siXyBr26gM5O2mHbf2FccawHFOJBwtjWkxzCD8q8sJ7FtsihoARVh0TOZCu5QlihGz LhR1EYj1iyBcUZuD/rqEA4VYAWYAGyGNWOy20= 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=K9wTx/bzabyVGZlV3iC0bGRTkJB0FOnykGCBr628XFds23Kk+IuxLcKs/Y93Haacbi xuVXr/pojTpiRRmAFK9+/KeRVg+QLq3MTbZgUYm5DbSwYc7wS6IobWAGoKiDbH59u+EV iuo7/tolc7tRgPqRw1gBz4Z10JHPN9MdU09TGDtAl5aJydGbmHcQ/91JgJjetIJj0jp5 z6r0t91YJ3YVumjVB/FrOqK+SXRwaYYWdX25UHXacmxiwEDG8OlDWszV7LjDOgcGVn3c ba0E73JEqVeF0Xv7EUUfWEI9lSM/iCg9HhOmU4stVjSwF7clTtofS6oNOvzijWBGOB+P lIUw== X-Gm-Message-State: AG10YORJPf8/+kqDsgUDkdrP6T/iFlKmd3vPsl7h9XjBbz8FOAmy6PFQe5ozv1S0RzSGfY8s4dQ= X-Received: by 10.98.42.88 with SMTP id q85mr40960631pfq.1.1453886162668; Wed, 27 Jan 2016 01:16:02 -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.16.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jan 2016 01:16:01 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Wed, 27 Jan 2016 16:56:11 +0800 Message-Id: <1453884974-24724-10-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 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) {