Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425277AbdD1JIa (ORCPT ); Fri, 28 Apr 2017 05:08:30 -0400 Received: from mail-bl2nam02on0054.outbound.protection.outlook.com ([104.47.38.54]:13273 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934924AbdD1JIY (ORCPT ); Fri, 28 Apr 2017 05:08:24 -0400 Authentication-Results: cavium.com; dkim=none (message not signed) header.d=none;cavium.com; dmarc=none action=none header.from=caviumnetworks.com; Date: Fri, 28 Apr 2017 09:08:08 +0000 From: Jayachandran C To: Ganapatrao Kulkarni Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will.Deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, acme@kernel.org, alexander.shishkin@linux.intel.com, peterz@infradead.org, mingo@redhat.com, gpkulkarni@gmail.com Subject: Re: [PATCH v2 1/4] perf utils: passing pmu as a parameter to function get_cpuid_str Message-ID: <20170428090808.GA84977@localhost> References: <1493355227-31492-1-git-send-email-ganapatrao.kulkarni@cavium.com> <1493355227-31492-2-git-send-email-ganapatrao.kulkarni@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493355227-31492-2-git-send-email-ganapatrao.kulkarni@cavium.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: BN6PR11CA0015.namprd11.prod.outlook.com (10.172.17.25) To BN6PR07MB2996.namprd07.prod.outlook.com (10.172.106.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fcd88029-04f0-48ab-5042-08d48e161ebe X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BN6PR07MB2996; X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2996;3:9neHJbQqOUuE/CsynEGUK5HJmCT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qC;20:mz1oFKG91afhKZaFu9BG4ETW+ZaNZU0f8/Hu3NE8egPlCBcNG4nEMvRtXLtSXtNX/6QjawwuGVy4BgsMoeGjaZJvSucZTuwI51f4bPAYyCNAaMYF4qFiJgw+NvknWP9CL8IIY50bpjTp2mFfZpNByUyeBN8gtwd9/MGY2jqPfCfhyt6kRW4TOejbGYJnFkez3V94muQ1/kVxeDU0z5fbKqPySWwsKRyGA8E+etodl126tCv8O8Ypfq6ccfXtDtqQT2nugv6+fuOgkB12VKpfVIu7SAiwPtprlIO1liTxvOrCHXtQ4m9Xh4++x9Ri81dKjuzZvcKEeZOUyV25fd1yRftd8Swr2/CHdgPNGuegducNyJLkZuugIFQpMW2xDOoTqOl15T0vzcSL3awkmyGLNIDgh/wlsEG3hNIPmMyWfC0jY3dEkzayY4lD/KROPPKUQebikePuQsb5MIBXUzafY/S5kZOi68d0FPTftSWw1vRsOlfHLiL71MTZRVvqhsSJUzk6kKQqDE1iihKxRO3reqKHWOdVRrWzIrvEdp6azkXXt1Z77rdn95DfVeS/VWeq95BdGDOUEtlPnmQudhwAb7chOSex9LxbX0vkbyzyN4E= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201703011903075)(201702281528075)(201703061421075)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148);SRVR:BN6PR07MB2996;BCL:0;PCL:0;RULEID:;SRVR:BN6PR07MB2996; X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2996;4:Tyy6MYAwE8itM3CLS2InI7gIFnUITJWpRn97+3u86rCZxzOQ+QeUR2MU9759raC+f2xu08wgq92qJzIC6XtRuyuNS2W6tk5DbIyd3op3onOgby8qujLlN0EeQ4V17HLbM/4lz9Xe9QQ8l5gDiMYlbSP2nbxA55hVC9D+f/aa5bX4z2zAZDri0F6IWAqpQv6Dam/ndOXj+DPtJW4EkjkmXAw7Ct9nCsiDd37xHBcfwildj9ykuGLVOxA+nJie7UwLxBUEC7au+BtU/OEVdHzX4JLE4Enbw4iCrWib/HAJ1EMflqquASEJzGy4Xn1iNLKmUx9f/kr9qLKz0YVp7GnWBSo0QbEQehIo+1Lrzve9uZVK7ZMxMdEwowMudV52phcNoW0u1TZvAOiQBWBvAzCQW8n0S3Rhjki8J7L05/U2tLrFF9NZbvZEMJZ0HagcT0lj6nVWFN+j2cNMxOcWyT2AHCp8a2i7bcDjajwW64teG5e/IULyRzO1r1htP1RFRjgUYvKgtwLJHh7QkfwlQONN4huyRzjRDTSHz/LyDKM5WCPG0z+bCmk1NjOsgZslSBz9wWfDz8ZfkmjsF56KQmmrseUVhsTpYkYqcdDMFJLEf1G6NA9wkQYBH7YhZDHCrWIlZgcW9nlSCELNkDy1N14APq1f0mg3rGdiAMkLlbNj0N9eZ4sTXE8Bxp28EzBg9ltAINkLGFmrpVjBJiveXuK7Mu8x9xdenAq3F+AlwjFztPw= X-Forefront-PRVS: 029174C036 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(39400400002)(24454002)(6862004)(110136004)(38730400002)(189998001)(4001350100001)(42882006)(305945005)(42186005)(4326008)(7736002)(33716001)(2950100002)(76506005)(53936002)(6496005)(2906002)(9686003)(81166006)(6246003)(55016002)(25786009)(8676002)(229853002)(83506001)(50986999)(33656002)(5660300001)(1076002)(76176999)(23726003)(54356999)(6116002)(66066001)(6666003)(3846002)(50466002)(47776003)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR07MB2996;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR07MB2996;23:nHsUMHNhNvvZoHLn8hBforxApxIDWi9HZ5hSAQtcZ?= =?us-ascii?Q?jrOK+t2WI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w==;24:4tBsG8OZON727xpoTZOaLfyTx+UJvXBnl2yABpHyYRKhFvoJD47xWmErbjSbArg7JvZqm5nZ6rG3VHZ/bne4cxtEqhFY/ABRdpNc5RFvosA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2996;7:0dedXx9YmDanJnt6uM2j9hESRRRCEz4r79pqWtJRr4SyRXExxAMcGQb75iEBjBOjMRPZU3TBMA/s/Nw5bvkJxUTqxy+PhDm13VSmlqsojeDACf4OVnYVFMJaxrvemajaPwO3GHAVWgxkM78E0NdRIW6Asu+e2u1RxJyh2/XUW7eDE2uNtlcA89k7OcHu18ioMrq3saC+rYS2BWrCB18dVXRcH5dQGsXA6tsOgtz4Q98XoCtDOeCVOFrfY9yRUCMXPYR+gNXQt//1mUrIr6K11ym8d1b9TCkvxAYlJXS86BU06ICsR2gbTGYc5HIjZoNU0c2XCv7u9mnCPLvtfe18OQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2017 09:08:21.3198 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB2996 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 31 On Fri, Apr 28, 2017 at 10:23:44AM +0530, Ganapatrao Kulkarni wrote: > cpuid string will not be same on all CPUs on heterogeneous > platforms like ARM's big.LITTLE, adding provision(using pmu->cpus) > to find cpuid string from associated CPUs of PMU CORE device. > > Signed-off-by: Ganapatrao Kulkarni > --- > tools/perf/arch/powerpc/util/header.c | 3 ++- > tools/perf/arch/x86/util/header.c | 4 +++- > tools/perf/util/header.h | 3 ++- > tools/perf/util/pmu.c | 10 ++++++---- > 4 files changed, 13 insertions(+), 7 deletions(-) > > diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c > index 9aaa6f5..9a70cc1 100644 > --- a/tools/perf/arch/powerpc/util/header.c > +++ b/tools/perf/arch/powerpc/util/header.c > @@ -34,10 +34,11 @@ > } > > char * > -get_cpuid_str(void) > +get_cpuid_str(struct perf_pmu *pmu) > { > char *bufp; > > + do { if (pmu) {} } while (0); If this is to avoid warnings, can you use __maybe_unused here? JC.