From patchwork Tue Jan 19 10:17:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 59971 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2484730lbb; Tue, 19 Jan 2016 02:23:19 -0800 (PST) X-Received: by 10.55.73.199 with SMTP id w190mr36367504qka.77.1453198999785; Tue, 19 Jan 2016 02:23:19 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 15si36708544qhq.60.2016.01.19.02.23.18; Tue, 19 Jan 2016 02:23: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 2730561760; Tue, 19 Jan 2016 10:23:18 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=UPhQNkHU; 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_H3, RCVD_IN_MSPIKE_WL, 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 EE8D06173B; Tue, 19 Jan 2016 10:19:08 +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 D652C6173B; Tue, 19 Jan 2016 10:19:04 +0000 (UTC) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by lists.linaro.org (Postfix) with ESMTPS id 01C676173B for ; Tue, 19 Jan 2016 10:17:50 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id ho8so188388269pac.2 for ; Tue, 19 Jan 2016 02:17:49 -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=JbxZxcobmEQSISc2I+6XFs31NnfsiQcSr98OddiqbFM=; b=UPhQNkHU831fbKppHqM0EXMKaYH85Je2Ge7hDGbsm504UBwFX+gX9MZLcqGcdGl512 rVGSaff5nFuV5l4rOO5ykxeBIXkAcF9tsN4Mqdr/oHKQxOqMeAlg0LEN+ep0Eo6FFGKO PgOMg8IjSF9V83oiYdhjZO8nBCCKuy9HXLUPU= 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=JbxZxcobmEQSISc2I+6XFs31NnfsiQcSr98OddiqbFM=; b=l6OrwSh1TIpzZqNETgJYB6IdgJAQuv7vPtir2JI6OlPoAAMPY6bdt6vZfF2jmBrLMc /m/6VoEbCJsbxScbvlg7lxNDnKxPqWL1dV8pKOgoF8j8caqPcfh9C3ZhmQY4JbGT0jMc uC3VxPgvVuP062lWAybSLqYLmFH4pnRXvOyT04Bp86n8dTI5Qdvt4AI3xEiMedtZgus7 DPpUzt1x090Dh+Rjy5XclgYCnBsE10UX2X4j2sM+U/p0LGemvz7ZvybTycZ7rVOQV1/B JJCCNu3fr9CJiCudFUeSJLphYsNicB7w+JGyeMND7MMHLE0IL8msEpEc6DPp0Wlv/udj S5Cg== X-Gm-Message-State: ALoCoQnBo11tgLQMxwWW1HdrIRJbFMy9DBgGbgftjV+cFRhSSCXTenH6DxHs1dWCD+7ZxwE34iV0bmuWk34HZy1zPwY0+/pA2g== X-Received: by 10.66.164.102 with SMTP id yp6mr42492250pab.25.1453198669305; Tue, 19 Jan 2016 02:17:49 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id k74sm40313374pfb.30.2016.01.19.02.17.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jan 2016 02:17:48 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 19 Jan 2016 18:17:10 +0800 Message-Id: <1453198633-24365-10-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453198633-24365-1-git-send-email-hongbo.zhang@linaro.org> References: <1453198633-24365-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v6 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 8e8a9d0..eee29fd 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 fadd1d1..d8bc5e7 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) {