From patchwork Tue Dec 29 10:31:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 59049 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2198284lbb; Tue, 29 Dec 2015 02:38:44 -0800 (PST) X-Received: by 10.55.76.15 with SMTP id z15mr32945117qka.32.1451385524676; Tue, 29 Dec 2015 02:38:44 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u65si68202767qku.48.2015.12.29.02.38.44; Tue, 29 Dec 2015 02:38:44 -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 329AB616B0; Tue, 29 Dec 2015 10:38:44 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=S4Acj+Ar; 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 501A8616D0; Tue, 29 Dec 2015 10:33:55 +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 CF05B61703; Tue, 29 Dec 2015 10:33:50 +0000 (UTC) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by lists.linaro.org (Postfix) with ESMTPS id 1120B616E1 for ; Tue, 29 Dec 2015 10:31:55 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id do7so3746475pab.2 for ; Tue, 29 Dec 2015 02:31:55 -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=1HplQ8I2doP/f7RROL6AGvOdCXG9JHd0llIXmvPb+Xs=; b=S4Acj+ArTg/VNfkofPxzBkkW7PYb93wty3YULimRUElkxwprybSceFArjiyIn19Og3 CMMpnyX7G1w23g+gS82vUpMgz+fGY8TMLWe/uuMnoZncoh0O5ZzS2gkfk02OjukOdfxz K9TWQZoHds4UatmzFGDNoTVc4FZrZzzD4hMB4= 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=1HplQ8I2doP/f7RROL6AGvOdCXG9JHd0llIXmvPb+Xs=; b=iUgtN+NWX50S2AOToOGK3MgTjCMUiWIdwtjJPZ8RTS/Q8r9rCQAkLQFOWqfEmlgtBJ EqGC0E8YwxI3Ne9G8iYWeQyVpmSFLrJ5trUybrwWvjRFyUviGTjGOUk20CcOZDddQLjN rZOP7YJhA60E9Cd3FtDB1beX5cFT5dUu1TxIf5p28jfiXzlkeiynMfzMqMis/8EYfEPf VYC28OyMrCL5MfkeikjwT8Rz9qOqmDQADwP+gT6Y9SW7G0uq3jAq54Or7zTKinqx+Mzg NxJ4dbZ3jddZ9oopl8BZysC3LcwC2aahbcahjm4jGJdgEhgmkfMb8wpmnhVmxDLbJ9xD /lMA== X-Gm-Message-State: ALoCoQmmr2878SdfTEhb/McJKz3+AKOY1ysUIBK9r92a1/Df+a3HcnEfznUP28sgtMe0Q0JeNCs5mTm9R/cAjX9EyWzC1dCAOg== X-Received: by 10.66.102.9 with SMTP id fk9mr78437723pab.77.1451385114396; Tue, 29 Dec 2015 02:31:54 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id 7sm82291757pfb.62.2015.12.29.02.31.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Dec 2015 02:31:53 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 29 Dec 2015 18:31:20 +0800 Message-Id: <1451385082-8364-10-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1451385082-8364-1-git-send-email-hongbo.zhang@linaro.org> References: <1451385082-8364-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v3 API-NEXT 09/11] 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 8b430f5..3415516 100644 --- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c @@ -16,6 +16,7 @@ int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo) int model = 0; int count = 2; + strcpy(sysinfo->cpu_arch_str, "octeon"); 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 61714f8..5f4e69d 100644 --- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c @@ -16,6 +16,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 24187f0..02ec9ea 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) double ghz = 0.0; 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) {