From patchwork Fri Apr 28 12:09:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 98357 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp233208qgf; Fri, 28 Apr 2017 05:15:00 -0700 (PDT) X-Received: by 10.107.38.132 with SMTP id m126mr10318646iom.176.1493381699967; Fri, 28 Apr 2017 05:14:59 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j5si6154487ioj.127.2017.04.28.05.14.58; Fri, 28 Apr 2017 05:14:59 -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 AB24B62BE0; Fri, 28 Apr 2017 12:14:58 +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=-4.7 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 D166262C26; Fri, 28 Apr 2017 12:11:55 +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 83E9B606B6; Fri, 28 Apr 2017 12:11:32 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0138.outbound.protection.outlook.com [104.47.0.138]) by lists.linaro.org (Postfix) with ESMTPS id 5AA2362B8C for ; Fri, 28 Apr 2017 12:11:10 +0000 (UTC) Received: from HE1PR0701CA0081.eurprd07.prod.outlook.com (10.168.122.25) by HE1PR0701MB2121.eurprd07.prod.outlook.com (10.168.36.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.1; Fri, 28 Apr 2017 12:11:08 +0000 Received: from AM5EUR03FT026.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by HE1PR0701CA0081.outlook.office365.com (2603:10a6:3:64::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.1 via Frontend Transport; Fri, 28 Apr 2017 12:11:08 +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 AM5EUR03FT026.mail.protection.outlook.com (10.152.16.155) 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, 28 Apr 2017 12:11:07 +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 v3SC9wZ3001661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 28 Apr 2017 15:09:58 +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 v3SC9wn2001645 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Fri, 28 Apr 2017 15:09:58 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Fri, 28 Apr 2017 15:09:51 +0300 Message-ID: <20170428120958.17526-5-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170428120958.17526-1-petri.savolainen@linaro.org> References: <20170428120958.17526-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)(39840400002)(39410400002)(39400400002)(39850400002)(39860400002)(39450400003)(2980300002)(189002)(199003)(9170700003)(86362001)(36756003)(2351001)(305945005)(53936002)(81166006)(6916009)(2950100002)(6666003)(8676002)(77096006)(110136004)(38730400002)(33646002)(356003)(5003940100001)(2906002)(106466001)(189998001)(5660300001)(105596002)(48376002)(8936002)(47776003)(50226002)(76176999)(50986999)(1076002)(22756006)(50466002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0701MB2121; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT026; 1:sYLF7709oEBbcJg21hOy2RO3j70SxivxFT0LzdY7Af1sY6DdzSpSVxNJ838v1lzOjkNzN8uog4xM1pebUOTy75gpA+RulNcq1GUdkva2b9F6y1XkBd3aTFXFmRLPLHnVoNU6bF41IG5jk7Hy8cFYucTi46mewnWRtb7l5Tbx+FdpQXFnimeBLFs9XAj0nD1BcmmSHfSmkr6V19cSPwU0r6UExu9nw99u4xkFpD/D7PwW5a4Lr0oeZFPkRqFikLgKJP0zAO3Lzd7U33EscwV03xoG7hUA8pq9Oji7UHEk/pSthE9aKwCVa9tQTa2wMKs+0ghW5ccnTDDjCig4huHqgmPJHIeSnMK2OHs+sIuXvtqRdmgX+SJPQsqJ5YclJKNr+TPtivcpAmE5nF346G5cetCamDNyepdCzJ6BchJGosRIwUxaUVaRwFQKUDZw7aSk2NEMNXSEm10NprrNr18LUjpG4ZvBhPEwT0hMBxNKtAvfmTW0gtx02OUgSM2t3WVxSe6lHKMprDy2uXLWDIgLlg== MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b9adb73-5338-4810-1164-08d48e2fa6f4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:HE1PR0701MB2121; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2121; 3:/Wo8Z5LCObtG5aV/cpyGxD+GLtBbCTbCss2qYcqrXWQbItNJDWJi1h8ywZ2rD2TukJa98S+udiN74N8GRQTbpRVxBkkL//gaGh6ivA2QMRHJGg+cGdbZjrjw43Vuxwslwe2/E3XnejOQQhs5Z0DTCmP89mMRlc4tkwoCbt/ThArri3Zc4j/jYl1w0H9LmT97ouvzpD5dNJejG+1JzI5mZdZck/5i3ewkZlwrgQTNynYF+EurOPZu0S8A6cwhE2gMLXEB6MsXpRGg7jTdLESzgX8Bud66ftU/X+ADcz7XEPjSFC/Du5ROWbi38r3wHgwaOKIMoFyxfJyXAinsCrpimqpkdgTEfEuuma+pgSBdgQ/QZtIwoJSE6B3c1yfsjxilUsb59rGL4SfvSJwKD97hCkwN0d9FhetdGXcRK2B9MMU9KtYQAZB1Wgh7IgsWr1MJwWQisMpLSvcBSmw28rNUqw== X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2121; 25:PaaAS3o5wK2YNZNfXU3NBbr7WzMiT8gt85RJ1Wg1ob4AR3KfQsZJRI6ulbUtS5DrmZFnga1jybn0mZdTAlStP1rF3ikZTdWLA/DVuDZV4z7PAb7maHbEYmqWhTs7vwAp/IpZD1oCSxgrfZHFCAaKZAWqK7sfZJHube6DQZ9qa+MwCT7cvZFD0ew5GjzHHRJSg6V5+DH/SPVfL32F89go7MxjSPPwAWr2P0eA9h3Fa2SoKeeFvkE3ivpJypiBR+PW5yLX+u7kG1hfcNegyCsTVf9LGg8SP/IJCkgJBGUY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cl/zkW2yyUB79Q1d3wqszxclx7wTXzFcs2leEcoAA6jqkAA= 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)(5005006)(13013025)(8121501046)(93006095)(93003095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6072148); SRVR:HE1PR0701MB2121; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0701MB2121; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2121; 4:ED1b1HdbtDQRoghZ+r2IIyqL3p/BFyUbftEX5LbUpK+6eJH31nVxtjPsSDs03RijSXD8sG1NgiGR/03U0h7iMETyYtset5LuI2W80lcw7b2U8PMl/LgMVLtloOS/icl2Kedkob7GdgiXOnKBw7h2NrAMFgFJt9GSjYFD3Ia9LuC/i8lCXRvXUmXLkFJ9Pik0tJDc1OO8u0IrhiH45V/elgd2gG4LAyK/4tzrmhB75gEOHiZPxMJiTauADNjf3JER5/D+Aa/3yynue8Eil01Xv2VSzHuFfFJFYTE4pRJNM1lvsV3vY9tjmAAiEqKAU/AYmlJCIoyAZKTGmqCgGvk9RCcbqq5I6hMsptnV6hrxj1DFGW4kF6Dyq8Blw2m1LEAaV2WlwBCtvbqoG3oNHgQKTN4lj7U8HOtB6t1YB5Ufqhw9w+ML8kIPbSViESg7NodyKcW2bXFYA8dTOVqzhQh692x66YIISd6AhckbwuzDGafDj7gJnsLYf54t9Qp6ESH9xH88x/KTxhOr+25PFajXO1ldY87WnrHb8ixbcbl0Jwz1XcQEt6h94CQd0cf8fPrj4AXhqUrKLz7k1dXaAaKiLBXe7zYGlLuM6visGJi2ahBnqKs6uRMvZnjpMR4ksuGJyCTdCO2NsDy2cZ9n57FMQuqbj2MLhvw6hg+mY9Q7eA2VnlGivo1VVWc8XYnds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EhxNsnLvJlwZNuPoICU2/52A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0701MB2121; 7:lnsBdw7c/RXx8ah9YLk4Up14jrtbe/VmPKwitfEDUwORZlkki2Hsn1BrpjP8bGWIzy31Xm6p4nNa6f7gVjjhhR1KrOWA4UYz2BNRzYhTU8FNeQSnmn4vU2/N6eY8BWlZ/D7sqCP+2CO3FT1sjYibALBTURn5ibs6N4MJy+c3Px6+wxdXBZDiR0hN21mG8a0ulzSfcsuwOxwN0RmmWSbQmBF9KzEEvED3xdBhvKy2qntf0MsaQn92Lp53YUEO7audghWjNbdgeSh0gipXczlTuvdWeWSHwCLh+Mln8yx0LVwiOLl8tpFxe7tF8Gkk5OAcaMZr3LIhBZUYyXf3l59TdA== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2017 12:11:07.9983 (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: HE1PR0701MB2121 Subject: [lng-odp] [API-NEXT PATCH v3 04/11] 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(); +}