From patchwork Mon Jan 18 10:10:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 59919 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1912959lbb; Mon, 18 Jan 2016 02:26:38 -0800 (PST) X-Received: by 10.140.94.68 with SMTP id f62mr30372782qge.0.1453112798850; Mon, 18 Jan 2016 02:26:38 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y130si30319912qka.87.2016.01.18.02.26.38; Mon, 18 Jan 2016 02:26:38 -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 0536D6162D; Mon, 18 Jan 2016 10:26:37 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=PvAD0K7Z; 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 214CA61720; Mon, 18 Jan 2016 10:22:17 +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 CC46561711; Mon, 18 Jan 2016 10:22:08 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by lists.linaro.org (Postfix) with ESMTPS id 90CF46162D for ; Mon, 18 Jan 2016 10:20:25 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id ho8so171292066pac.2 for ; Mon, 18 Jan 2016 02:20:25 -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=z6Jxwyjn0lQzpssqTyB941E77eE8QfFqWkGZhyKqDi8=; b=PvAD0K7ZqWVxGpHZtsRgA4BzMW9/uTeAxfJ2U+4+bENzfore3oiA3+vlyXLEM+Fx/9 CzwLNto3sUATLkE6peREZ2Zb2O+hhDnsHaghnuvAOe04590AcGq2iTqP6JIjPZ8/ziK5 sIQyMz40APP/c6zH7Ge4qbCNHRl4FMGMnkrzE= 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=z6Jxwyjn0lQzpssqTyB941E77eE8QfFqWkGZhyKqDi8=; b=OmmuXYeAo99rGKUSxfGqJ3qMnb9LbCd8zesA4qIUWPNhEIk6DGaFb/dkFAFLdHedoS S3pY9sprf4SKPV54+yBhB7F12nd81H7LvIP84MmqEyOOg9y1JGN/r24CJrp2EUBwwKNH BBhRWhUwPbBX+HcMnMHt5254UruGLIPUXtVTy68rx6lRhhIhbXi866+flA2XhbceGbAo GWA+n/N3pPJwiAd4N2bFBI1pf4GPUlhUmNMhMSjZ6V6dqC/AUFz23N84jpkrzmHXfLch Fu676UcqoiHza8EE93SELrwT6RTRiQC14T0lh06WurWxPW6RBPKhXp0OjFOB7QMmAOAK lViQ== X-Gm-Message-State: AG10YORkLyMk48c6nxP28TPLOjuGamBxX8+holfHsllkIjMJUD9j6yTy6Wsq5pos07SU2EMtcGk= X-Received: by 10.66.232.132 with SMTP id to4mr14233583pac.95.1453112424934; Mon, 18 Jan 2016 02:20:24 -0800 (PST) Received: from ubuntu1504.ap.freescale.net (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id x10sm32844521pas.37.2016.01.18.02.20.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jan 2016 02:20:24 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Mon, 18 Jan 2016 18:10:05 +0800 Message-Id: <1453111808-15762-10-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453111808-15762-1-git-send-email-hongbo.zhang@linaro.org> References: <1453111808-15762-1-git-send-email-hongbo.zhang@linaro.org> X-Topics: Architecture patch Subject: [lng-odp] [PATCH v5 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 fd3cb0a..bb1d5d8 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 c471a82..e221f10 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 71c7c9f..aeb3d8f 100644 --- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c @@ -14,6 +14,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) {