From patchwork Fri Apr 21 13:11:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 97901 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp320729qgf; Fri, 21 Apr 2017 06:15:17 -0700 (PDT) X-Received: by 10.55.92.3 with SMTP id q3mr12900285qkb.164.1492780517186; Fri, 21 Apr 2017 06:15:17 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a41si9511210qte.176.2017.04.21.06.15.17; Fri, 21 Apr 2017 06:15:17 -0700 (PDT) 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DF34B63360; Fri, 21 Apr 2017 13:15:16 +0000 (UTC) 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=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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 4D0A363368; Fri, 21 Apr 2017 13:12:23 +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 F0A5563364; Fri, 21 Apr 2017 13:12:14 +0000 (UTC) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20110.outbound.protection.outlook.com [40.107.2.110]) by lists.linaro.org (Postfix) with ESMTPS id 6180961CE9 for ; Fri, 21 Apr 2017 13:11:56 +0000 (UTC) Received: from VI1PR07CA0020.eurprd07.prod.outlook.com (10.163.160.158) by VI1PR0701MB2126.eurprd07.prod.outlook.com (10.169.137.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.6; Fri, 21 Apr 2017 13:11:54 +0000 Received: from DB5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::207) by VI1PR07CA0020.outlook.office365.com (2a01:111:e400:533d::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.6 via Frontend Transport; Fri, 21 Apr 2017 13:11:54 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by DB5EUR03FT025.mail.protection.outlook.com (10.152.20.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Fri, 21 Apr 2017 13:11:54 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v3LDBYcT025458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 21 Apr 2017 16:11:34 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v3LDBYOf025438 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 21 Apr 2017 16:11:34 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 21 Apr 2017 16:11:29 +0300 Message-ID: <20170421131134.27992-4-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170421131134.27992-1-petri.savolainen@linaro.org> References: <20170421131134.27992-1-petri.savolainen@linaro.org> X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39400400002)(39850400002)(39450400003)(39840400002)(39410400002)(2980300002)(199003)(189002)(9170700003)(8676002)(356003)(5003940100001)(81166006)(77096006)(50986999)(2906002)(8936002)(76176999)(305945005)(6666003)(33646002)(2351001)(6916009)(106466001)(47776003)(105596002)(1076002)(86362001)(5660300001)(50226002)(2950100002)(36756003)(189998001)(53936002)(22756006)(110136004)(38730400002)(50466002)(48376002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB2126; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT025; 1:W4Rpc2GZP/98CID1h5jmFly1cSPINGLqeh3cedQhLWTXIZu5N72HeXvZn7piSnEqCxIBeiiN+x0UnEw+kJ9GJ6aYiN+9DiB0PWtsvQx3/JyxSYoCOjVygZ2nbJp5y7T8Jo9QAO4LlLNvZ+ROSAhr+aY/wMYL2b48auXTDxMFc9It4Mwm6M4cAkI3iaevieriYDPqITps/WWRD0JG5hZ43lbgB3/pKnp1TrydCoiBXRvPFHQfYOdRwicq6TYzKbg+TxSP+YqApvA+/mnspf2b9iv/5ImHwDAdS0HxwUp/aKtU3OXdB3AsbLen7Yfr6wVcwPt2icCk1Ck8VZpmtHR+gz1LVWRB5h5h1XxNkxjBEJPlGwrZGlqku9WMLXHRJeDBGgVDcMfRGjLRMU+fBOh4O1Yu3tICQXzNKLEM2m3S+Go9+xsQgg2IpYeOaYp4rmfYfTYVn0z83ov1FnmATppDVhR1bqSx8GzEvnAiIzP9GJMA0iwjCC+FvEhbsD0OIsFT/lGcreV/fZKzHXjjeNcoWw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5d2718e9-346f-4d11-fe77-08d488b7fb78 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:VI1PR0701MB2126; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2126; 3:7dmSpWOHRqx2yianNOeFIj6a+dPzIczsiGqar4hWx//LESIVcIAQcFdg1W02Zo39zaDbLwftaKrPRch7P6WdKBIgEplwenALPSvKcCqkavVZtQoadbsCnGtRCN6bACKjGYL9vGVyC3FiPUWxUKksgVoYZ5cXWdgi3Y1UwvVNBuCAIoGqPHMgx5rCzGvr00HV2xR5Y75eOBD65C+nxXDdY+coaB1Gsi1ipY65+li8KhE9uV7fkF+pfL9Q1g9TsmBiKsyZf/vOLwnjP4hw3Mr+ym7YPjViw64dJFbsiyQ+LuBlzGyFKeeH8aOvV1g2pmc2Owh6x8fYxLhcWnd7038gGpivvxYRcjj9Q0fwJBTmiXFKavWYU0m32XV+McHBSq2qJnY3txhicDSzHWhVy6vN/MOQO5NGm1lEE0AbCMiJI5xgi7Ev4aVE1YItO8GK3Aw+HTKzJ1dtA7riSPj2e2D2TA== X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2126; 25:yimDyKv7wUGIFBXULttVcSniGAb4NY5eKs7g2TR9k273722cEpiAVUmmvxBlGJFyLu1gTWWfALdzYyqgsUw8yTjZ3dtr3h3VB+Obf2sm10fYGsW/iK+u7GH0FeA2G3u+u58p1Z91HmbCRSemC3IGhGpIPMpT0Hz7tb0rFxxxg6NcW1gaym7LSHhpsxdCtU7WNT7xf0Amb7N+SmlCuLbIHOwqXhZtJ+ePMfc9o4SFVGZEb3mf2wGLlTwtd0/NIzTQCdH/CLbJoST568/MPERkw+lrOX4ByMoa9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gJ+U6tPcPK27A9uvtfA2nllHpfkVO40Bm3JY5mZZgQZTjSM6vCe2tEQY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13021025)(13023025)(13013025)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:VI1PR0701MB2126; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2126; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2126; 4:KyVKl06h21XGZwp5242zb0rfo32mRkaXBE/DXk4MGEOLbKvPZDWTdiw1ze5R0Kx1+kaJP4Q7XhButtgGFKxGqE9T+FNu0pyauv0eft9Z2c1ADTJnMw1lcIV17Q8dCHDHEoIqLo2untLPu+G1wUoM/N2aQx9ne7pykD2gv/5xQRPcWMhvoxNy5dGZ8XM6NRe5Y1vEbaDKdjRlZs2mKeQRyXEsOg69vxanMe5cyJXw4F3LBNSc2L/KhXJAHxT8Jab+Dc/aNmyeGSQC7/rrZeUjWSW7K04s/PFjqhxZaJMUB4oSrx0Kxk2DxGpM99j5lNqIvMKq97mwZmzXF9c251vR2MksXihQRcZKPP20DqKTGAnRDU5GaRQZVO0z5UKesnD68NZXopjfYlspKFxlaW8zEzbl1dQl/3Qq4147+vlToAMUifEQ9OmaL70qaToYM470tv8OpU33yr5csEUQcPvahml2b+9pezjoIAUKVQEhsRUP8EBWSyDw2nslPC8w5hGKE6TiycFkYRsa4sN9GBb8pg2tVr7u6NbbOzwihqpQLfYlXjWVxtrOQkcNNA6BL4jexDG2wspKg6w93mu3+BhPostJcQY0R2NvBjfrfEvwnheaEgiZWFjAUFqCPhugPWs7eiI9CA4sWV1coKy+hTSJ8nZr7Tyx0jh8fKWb+t8XJZZC2HfkH/UdCFL6M1nJJQnhiMwfS5e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99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2126; 7:LzANl8LA8A/m35GGjcgCH2cFKF1P86jGpXHj2atuNIf7kAglfIba4dXfnu+PC46C+t7trMVNA9GEtVDsiGS5P9GXn5tJbZPqgW+rw1Frwq5QZgWECWHOIycmDZqaS/5icWay0tva/H59mFxkLnZGX4BUryTd94Znrv+xzeMiJ64ri60X8/zuDNlx+Bpn7XFFU1/D4Xm4p2GXLVRnN4g/AV9htakeXgR0Gfet1+yiAJ0BavKqrZjuxZDLAFvgPMCHod+iQQHFjC51OvI43qQ3keI+bwLKU1gxwAqxbcSYT1vV7YAjpMskvk8NYjkOHQMDR6or9bURT+6YZKfNzEsWLg== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2017 13:11:54.3610 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2126 Subject: [lng-odp] [API-NEXT PATCH 3/8] linux-gen: system: implement system info print 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Print API, impl name, CPU model/freq, cache line size and CPU count by default. Print CPU flags in case of x86. Signed-off-by: Petri Savolainen --- platform/linux-generic/arch/arm/odp_sysinfo_parse.c | 4 ++++ .../linux-generic/arch/default/odp_sysinfo_parse.c | 4 ++++ .../linux-generic/arch/mips64/odp_sysinfo_parse.c | 4 ++++ .../linux-generic/arch/powerpc/odp_sysinfo_parse.c | 4 ++++ platform/linux-generic/arch/x86/odp_sysinfo_parse.c | 6 ++++++ platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_system_info.c | 20 ++++++++++++++++++++ 7 files changed, 43 insertions(+) -- 2.11.0 diff --git a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c index 53e2aaea..8ae2022a 100644 --- a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c @@ -25,3 +25,7 @@ uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } + +void sys_info_print_arch(void) +{ +} diff --git a/platform/linux-generic/arch/default/odp_sysinfo_parse.c b/platform/linux-generic/arch/default/odp_sysinfo_parse.c index 53e2aaea..8ae2022a 100644 --- a/platform/linux-generic/arch/default/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/default/odp_sysinfo_parse.c @@ -25,3 +25,7 @@ uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } + +void sys_info_print_arch(void) +{ +} diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c index 407264b7..d6f75f28 100644 --- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c @@ -62,3 +62,7 @@ uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } + +void sys_info_print_arch(void) +{ +} diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c index 3b88d55b..bd4b9b42 100644 --- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c @@ -61,3 +61,7 @@ uint64_t odp_cpu_hz_current(int id ODP_UNUSED) { return 0; } + +void sys_info_print_arch(void) +{ +} diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c index 96127ec6..d77165a4 100644 --- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c +++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c @@ -5,6 +5,7 @@ */ #include +#include #include int cpuinfo_parser(FILE *file, system_info_t *sysinfo) @@ -73,3 +74,8 @@ uint64_t odp_cpu_hz_current(int id) return 0; } + +void sys_info_print_arch(void) +{ + cpu_flags_print_all(); +} diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index acfc3012..90e2a629 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -133,6 +133,7 @@ int _odp_modules_init_global(void); int cpuinfo_parser(FILE *file, system_info_t *sysinfo); uint64_t odp_cpu_hz_current(int id); +void sys_info_print_arch(void); #ifdef __cplusplus } diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index 18c61dbe..4d6f7f81 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -405,3 +406,22 @@ int odp_cpu_count(void) { return odp_global_data.system_info.cpu_count; } + +void odp_sys_info_print(void) +{ + printf("\n" + "ODP system info\n" + "---------------\n" + "ODP API version: %s\n" + "ODP impl name: %s\n" + "CPU model: %s\n" + "CPU freq (hz): %" PRIu64 "\n" + "Cache line size: %i\n" + "CPU count: %i\n" + "\n", + odp_version_api_str(), odp_version_impl_name(), + odp_cpu_model_str(), odp_cpu_hz_max(), + odp_sys_cache_line_size(), odp_cpu_count()); + + sys_info_print_arch(); +}