From patchwork Thu Jan 7 07:38:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 59272 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp394455lbb; Wed, 6 Jan 2016 23:45:27 -0800 (PST) X-Received: by 10.140.97.5 with SMTP id l5mr134643691qge.84.1452152727856; Wed, 06 Jan 2016 23:45:27 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g67si77540824qgg.60.2016.01.06.23.45.27; Wed, 06 Jan 2016 23:45:27 -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 5DA0B61C94; Thu, 7 Jan 2016 07:45:27 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=KhPi1Lb+; 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 DD26261981; Thu, 7 Jan 2016 07:41:06 +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 8827A61CB3; Thu, 7 Jan 2016 07:41:04 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by lists.linaro.org (Postfix) with ESMTPS id 9CEE161981 for ; Thu, 7 Jan 2016 07:39:12 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id qh10so1761220pab.2 for ; Wed, 06 Jan 2016 23:39:12 -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=4Lk0tMU12LOu42Z4rVDrFtNQXYNS3F65/0WR75xvNMg=; b=KhPi1Lb+Gu+qYLQHI+9uqUz6CVi4lT744k23nLvJ+kmhV2vhQ5gJGyIrN2aL0Mh9Zr 7L7qm9q1qABszuzNy7M8t9mp6dEKs214FXWDai6gsK188uaZuMuLTaKKGYCpMHv0PEJK GMlpzNRWmaCRunQXS67I4PhS76L1/+4I5rVuU= 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=4Lk0tMU12LOu42Z4rVDrFtNQXYNS3F65/0WR75xvNMg=; b=dMnBWHunQPiz2FqkL5g0sCTpua9giYmtOf6DpDPGmgMa41uDTlEAlmyJITMq6vrieT sNjGh0mQajvftKpzK5lx6xgx9BX0Zb9qvgu4z6qByXTGGHKjs2OrtKn6lrPq9bIBzHWu sQxq9eQZeXZFRXlNZ1VbVphMcZghgFaAv4Ijjt29awJjDRYYymHCABGcj3dIg9lSOU7C 4MrudVUlMwYooiEh6VVq8sUQGKBifH8X1b3PaKBuMed1Ns9Aq8B98D79LrsHG25WVI57 0U3wLC76KGFm5ul3XJLdIpL902Xpz39luJ1yE2qyO0HL0eHKH8XjmmQWzeXCnOlrUfNu 0vXw== X-Gm-Message-State: ALoCoQk+owuZvVHi2gmsyJ1benMiUpUSckSQuYSLQt1819phzoeX8khEBr8zjcHg2oqkBBkcT6ljWBjsLpGats8+M5OXhdltAA== X-Received: by 10.66.227.1 with SMTP id rw1mr150384889pac.35.1452152351993; Wed, 06 Jan 2016 23:39:11 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id tb8sm150067484pab.22.2016.01.06.23.39.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 23:39:11 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Thu, 7 Jan 2016 15:38:30 +0800 Message-Id: <1452152313-27276-10-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452152313-27276-1-git-send-email-hongbo.zhang@linaro.org> References: <1452152313-27276-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v4 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 8b430f5..e8f91b1 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, "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 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) {