From patchwork Mon Apr 24 10:49:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 98036 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1422254qgf; Mon, 24 Apr 2017 03:54:41 -0700 (PDT) X-Received: by 10.55.184.1 with SMTP id i1mr27942804qkf.102.1493031281672; Mon, 24 Apr 2017 03:54:41 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l126si17663696qkc.129.2017.04.24.03.54.41; Mon, 24 Apr 2017 03:54:41 -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 63CA9608E6; Mon, 24 Apr 2017 10:54:41 +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 39A0360C05; Mon, 24 Apr 2017 10:51: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 1C3BD6069C; Mon, 24 Apr 2017 10:50:49 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0131.outbound.protection.outlook.com [104.47.1.131]) by lists.linaro.org (Postfix) with ESMTPS id 3332F60C0C for ; Mon, 24 Apr 2017 10:50:07 +0000 (UTC) Received: from DB6PR0701CA0024.eurprd07.prod.outlook.com (2603:10a6:4:3::34) by AM4PR0701MB2114.eurprd07.prod.outlook.com (2603:10a6:200:49::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.6; Mon, 24 Apr 2017 10:50:05 +0000 Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::202) by DB6PR0701CA0024.outlook.office365.com (2603:10a6:4:3::34) 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; Mon, 24 Apr 2017 10:50:05 +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 AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) 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; Mon, 24 Apr 2017 10:50:05 +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 v3OAnHkc005808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 24 Apr 2017 13:49:17 +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 v3OAnHYR005796 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Mon, 24 Apr 2017 13:49:17 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Mon, 24 Apr 2017 13:49:12 +0300 Message-ID: <20170424104917.24102-4-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170424104917.24102-1-petri.savolainen@linaro.org> References: <20170424104917.24102-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)(39840400002)(39400400002)(39850400002)(39450400003)(39410400002)(2980300002)(189002)(199003)(9170700003)(110136004)(38730400002)(22756006)(189998001)(50226002)(8936002)(2906002)(1076002)(86362001)(53936002)(33646002)(8676002)(2351001)(105596002)(50466002)(48376002)(106466001)(36756003)(5660300001)(305945005)(6916009)(6666003)(2950100002)(47776003)(77096006)(5003940100001)(76176999)(356003)(81166006)(50986999)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR0701MB2114; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT040; 1:V2vkOt0bR6MoVDbwuRUF3cJkv3fIFmCWVqoQJAjp5stVQGK8HEPEbivD2jeGT1Z5eW5/4QXwjwUCe+yy/vPzBWbGKwSNj6Y8wqPUWY22wT1mwaOmkSVIaFyhknpvRj14noJjS4cHOab/9o7eZ2flfe7loJrGBZ8oitVPyjhYr1Xd3oIkFDauUHlWwy5GszlEz1LuL+/ba5wjA8J5K+AJcX8KBPcpK3HuArfEWifdbCHjAyeg5ejVl+/YEz+9eYPgnVJnOMKs8QizPE8oJ1BOW/w5qOv/ejVF6OIckneg2lMCJuhusFpvg5BcEc3Dw4h0AB/Xh94fmjvBSehohPzsuR7GvEZjonmMVKbaLKRJa7MR8yBjZPvR7W3JmUB0ZHAzOGIempuywYqv5I1Fc4vlZN8cUzDZyey64NJQ9f00NdHyYx9Phm6UXcTI222yPcghYVOJN2fiCOnf+gjlWnlwWWKFp+pcHsbZHJFLYfcO5IbBQsl1ppv2KnHsRuhgOPDQQG2bdEa1w6djZd4ha/DF6g== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d1ed1de0-2b22-417e-d86f-08d48affaac6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:AM4PR0701MB2114; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0701MB2114; 3:PpQS+BN/MfcWuLr1POFHqnPaQaYzDY2ER1llExSJX0z/7cYp7OsvEThU5DhW1X+8G68kwYrcPe4YmgxD6nXJrOMaS4m9mEiJd37aL+HLCMoakzIPkToHGRJ2uLO8Om/TOFaNoHZcNOWcSY0wfj1+/lOIhlZAMlU9y3jYv8vB1hL0xiZHM569+SDZHzGLUZ+uUDc4SV4ZhQikYoKKYxiZInd0pPUpvofO2JSdDoeP9elYJnRKhkynqZFzFOPk5QNdZgBGQhxShE6/YgUgMCvRP2SR+nK4VhBfDWIrU2y+MZxGINH72MStU26N8YpG6NVd5heEZQHG4kTY0/NyKdsU3aXYTOKipzfl2/HswX6Mcyrdqw8fEOe2qtciwmU8hFBdgjtZhVU+mBgF6+YRrilrYd4IspJb8LU/PPFeqnk9QdtaCJvR4gCVxqnkksvfehYsOjWz2XqPaEmj/iaGgN4P3A== X-Microsoft-Exchange-Diagnostics: 1; AM4PR0701MB2114; 25:CqMHaQ19gf8aN+DhuzZx6i+6j95EGohnqwknlfrmj8V/egUUOYoqGBChN8q77QkXo7Av9SoPltbY/bU4dCJK26YJ+sBHnAT9fvSvmqZrxn1urfEYTfQyBDMjVPo1+AOGuT2QlyPVOsPrSF4ZR32sLd4RXl+6Qp0XmBKinA4mddKRePaKzE5AplW/yddHz5V6dPEqyjITvL1/2Ur2mGHmmuGPVUPK4UbFAuBgVcLyXBOTxW0k83L6aHdJP4Hk/IUQi3TwBSJ9lTXj5DXgB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dtLcIhgnd+NpOThWY/dxgc9i1OQxmh0pjl0pBwMOIrTFNlyqZHm4NCDK0Y0qbdFYJ40eTKxPWigA4sjElB/v6sySc6eW8N+qQ2A9RMR14LlusvpTWd9QaRSxs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(13021025)(13013025)(13023025)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(20161123558099)(201703131423075)(201702281528075)(201703061421075)(201703061750152)(6072148); SRVR:AM4PR0701MB2114; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0701MB2114; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0701MB2114; 4:spIBXiq287KC85EZuNAFENV1jKUgYSbgLBl3G4H9JSLGZBSXCeQAZywsybd5t5k642gfn9jvkCdWthiw1VWzVV+Xf2Jt7W0BMEJ+PpSRGfjUVxCEZvH6DwlTLjiaeEyqV80WuR5jha/M2devjo/SpOrw2a8g+F4USOJ9oDs4yZjXj+szywK3qWGovjRKpeIuTdz8/3n5bXPZmcmw5gnEPRl9M7DqicvGLBcDWKKdrKOJE08mqB0pvA0wFkLo1kLsbddYdiktCDLHv922aT3JYKmyuVrM6pg+AN1Q1gKhIqyGAprvJyH06wFMyGzG/DNPzrLhrM20WaF56OScJmtfpQYCChmfRASoq5qFmEnZSNdnEFHRKpQCSfklJuH2ORkja5SKh8A0b7UJ8VjZCpPTZFEn8vriornWE2h4CCqlgaLbRRFTS5Ocl8muhKM5XfcTjEZbXgpUcCUMCfWbZhDiY+wXVzigUXvpagHlxCbcycSCserSOdtEKPKbkbugb8n+aXCX4EaFMuRut8yvxGZiGsnzJowDd0cIHbBma7+5H3A9fT/B6vudoda65vIMu6hCIorojNHlHeRbf571IYy6Isi7igwvbS6UN2p99yPuH7U+lvFIxEywsDvJHp63lGcTbIFZxd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OSDFZnBLippsrAIGUwTWqOFwGv9RXyJmOyg==; 24:eYupZPgLNLkjMYacH8Sg5P7XNG9BITdfVqUH1B9eNm9loq8N224YSNhT6Hv6Oayv04yGYqvCVibC7a9I1KVxechCDf3/d0rwpINP79diTxE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR0701MB2114; 7:6yRS2YEhF7YEEVMLFL8qJ3pLN2/MOuZQxIC6dNMJL6TybV8VtuStLlDDfHm5qiZYzH1cprsKEj9OZ1eUhhESueiKG6RdMdIeLRPwbjv729bh1K/kWtr5QQxIqL3bDfhGQQk4ye8QaP7SLfdTiG+6meHotAqAf4SMY94Bz7ecZC8bmqFas+IqV1fOOJGhl39/X1u4w/ga9cyEUWrhNB0p3oWXw3n/ipfhS0qT5gP2KRHeLy3cT/NM4+5HO8F7PpYF5NT9NKWImpnjcSimPDaeOAVbo2ts4A8lbs19yoPO3n/uaF9nFqW1QeaahpQv/WeuxWLOsqZ1Fi1acSxwJwreMQ== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2017 10:50:05.0971 (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: AM4PR0701MB2114 Subject: [lng-odp] [API-NEXT PATCH v2 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 --- .../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 +++ .../linux-generic/arch/x86/odp_sysinfo_parse.c | 6 +++++ platform/linux-generic/include/odp_internal.h | 1 + platform/linux-generic/odp_system_info.c | 30 ++++++++++++++++++++++ 7 files changed, 53 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..40ffca07 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,32 @@ int odp_cpu_count(void) { return odp_global_data.system_info.cpu_count; } + +void odp_sys_info_print(void) +{ + int len; + int max_len = 512; + char str[max_len]; + + len = snprintf(str, max_len, "\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()); + + str[len] = '\0'; + ODP_PRINT("%s", str); + + sys_info_print_arch(); +}