From patchwork Tue Dec 29 08:56: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: 59030 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2160382lbb; Tue, 29 Dec 2015 00:58:07 -0800 (PST) X-Received: by 10.140.236.68 with SMTP id h65mr10795650qhc.13.1451379487566; Tue, 29 Dec 2015 00:58:07 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z69si19529138qhb.64.2015.12.29.00.58.07; Tue, 29 Dec 2015 00:58:07 -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 1177D61732; Tue, 29 Dec 2015 08:58:07 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=ieN6GNTY; 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 3F33E61739; Tue, 29 Dec 2015 08:57:14 +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 94B4361739; Tue, 29 Dec 2015 08:57:10 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by lists.linaro.org (Postfix) with ESMTPS id 6528C616EB for ; Tue, 29 Dec 2015 08:56:44 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id do7so2758850pab.2 for ; Tue, 29 Dec 2015 00:56:44 -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=xIj3SLqgAD5m+N+nBaeAEDfcoXNCRi1AsibgqCAWqwg=; b=ieN6GNTYhBNb28JReNy1Sz6tr2Mjzr83UaUo9vEWt+JHcGhFiC6g0ZZzDWjcU/gKv5 ikofNOyQgL+Yt56NWTqb28IXTSAoA86cz202PvLd+8J6MEey5YJFb2sgycWpPBT3SFCW 4EGjIelzIHbda/4Gqa+Tx/X9j0bFJb4F3o3Ck= 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=xIj3SLqgAD5m+N+nBaeAEDfcoXNCRi1AsibgqCAWqwg=; b=LbPX9xtrltQGA63UQbK+OYIlCo0CUNy9f07NF+jW5S9NBBQvNTm4DA1zgbY4fKegyc DLmEWfsgX/KILjqFwIYT8tYsAQrLXvxDfzEcFmCk7d/ZYxz83fy7Rgo91I5YTcqQO+4u bBYoTPcJV0maV1I8FhFYqh1m7cEuIeJApnYgWRHhoAf3ttqNtU0QUecLRMwocaWbSVrc iMGWPQSqGAiwFc1IXd2XIyEYTHIJpuxF2JHj+fidXWbUDSXxA2Y21HkLbbULPXo0XxF1 XXQdviY/3erUSDpk2ipHvlInGy9XdBnexcf8ptAPWBRs6Zph/ttyj1vIl97uifxeMIYO h2Ag== X-Gm-Message-State: ALoCoQly9c2QfuAsuIAQ+AW3GL1foQsNA1E+5InZ1BmAz0ZyqrZxBTUiHld8NvyDy0LHzL0IYRi3IMDygFWmXOiGbnid4mXh4g== X-Received: by 10.66.158.193 with SMTP id ww1mr84239343pab.21.1451379403593; Tue, 29 Dec 2015 00:56:43 -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.56.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Dec 2015 00:56:43 -0800 (PST) From: hongbo.zhang@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 29 Dec 2015 16:56:20 +0800 Message-Id: <1451379388-7533-3-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 01/11] linux-generic: sysinfo: move cpu_arch_str to odp_system_info_t 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 This is a pre-step for separating platform specific codes into their own arch files. Value of cpu_arch_str will be set later in separate arch parser code. Signed-off-by: Hongbo Zhang --- platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_system_info.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 49e23d9..2eeba42 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -31,6 +31,7 @@ typedef struct { uint64_t page_size; int cache_line_size; int cpu_count; + char cpu_arch_str[128]; char model_str[MAX_CPU_NUMBER][128]; } odp_system_info_t; diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 6a05501..8cbdd58 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -26,7 +26,6 @@ typedef struct { - const char *cpu_arch_str; int (*cpuinfo_parser)(FILE *file, odp_system_info_t *sysinfo); } odp_compiler_info_t; @@ -291,19 +290,15 @@ static uint64_t arch_cpu_hz_current(int id ODP_UNUSED) static odp_compiler_info_t compiler_info = { #if defined __x86_64__ || defined __i386__ - .cpu_arch_str = "x86", .cpuinfo_parser = cpuinfo_x86 #elif defined __arm__ || defined __aarch64__ - .cpu_arch_str = "arm", .cpuinfo_parser = cpuinfo_arm #elif defined __OCTEON__ - .cpu_arch_str = "octeon", .cpuinfo_parser = cpuinfo_octeon #elif defined __powerpc__ - .cpu_arch_str = "powerpc", .cpuinfo_parser = cpuinfo_powerpc #else