From patchwork Tue Dec 29 08:56:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 59037 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2162497lbb; Tue, 29 Dec 2015 01:03:14 -0800 (PST) X-Received: by 10.55.73.142 with SMTP id w136mr76354920qka.87.1451379794801; Tue, 29 Dec 2015 01:03:14 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z139si69340547qka.98.2015.12.29.01.03.14; Tue, 29 Dec 2015 01:03:14 -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 5445761704; Tue, 29 Dec 2015 09:03:14 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=GwdYRPNf; 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 633D561763; Tue, 29 Dec 2015 08:58:26 +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 21F076173C; Tue, 29 Dec 2015 08:58:23 +0000 (UTC) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by lists.linaro.org (Postfix) with ESMTPS id 9CBB26173C for ; Tue, 29 Dec 2015 08:57:03 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id do7so2762295pab.2 for ; Tue, 29 Dec 2015 00:57: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=1HplQ8I2doP/f7RROL6AGvOdCXG9JHd0llIXmvPb+Xs=; b=GwdYRPNfYFsJ+X6b+bDA5UOTbkWbYba6TojSrF/r2ovch3cIqO4TRCJbHeK5ZOHe3r 2Hc5tZjVYB10gbG+V0rgYe9r/raFHfQlVUXAZeVo5yK5fXpgEdwnZlaMwGJ3AXfHMxsI 5npIe3SnyV+Qwl+E9y4Qp1TjUJy8LsnplEbjA= 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=dc7t9/6hOt4IKglDtj7xsBuzxmv3I6twJCg9OMW9iZT7WOGsY0YUPZUznLAnhTh4W+ r/nvICxeTRg1mgS6k9wwVcbN7D+MSGttaXw1SHGQwQjzQRBoUsFEf6L/fxSiKdUvUyma MADfs1JV2Uov1bBVu2PDFAB/QVaeqxqa28jDx2gI2qfVpjP9msk2s/YLQw2DUid9dKFJ 3/jGoIJGS/1N8lLQ/Mfmk5MbgcLY+5LrB3BcNw20uvAeBNU3yuZc2cgpJhhW7fatZ0lK niIZnb5O2JCLBwTaJegcSecbqxeCKLI8Eisjbst5SNppKrAZWxgk6I1Ega+ql8qWRXbj CSPA== X-Gm-Message-State: ALoCoQmoFFg+TtnwIAOjNSs19qel4vhL/KmN1lVG2my0jcIB9mmvrCATJqdRsBN5oxiE2QK+1XzhBkgDPiKqrNxa2atMqbS1KA== X-Received: by 10.67.14.3 with SMTP id fc3mr85594491pad.134.1451379423001; Tue, 29 Dec 2015 00:57:03 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id p83sm81609266pfi.96.2015.12.29.00.57.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Dec 2015 00:57:02 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 29 Dec 2015 16:56:28 +0800 Message-Id: <1451379388-7533-11-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1451379388-7533-1-git-send-email-hongbo.zhang@linaro.org> References: <1451379388-7533-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v2 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) {