From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C475FC43334 for ; Thu, 9 Jun 2022 11:35:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=olzRmOl4i2c49y8EcBfs5X/Egu1kHB6DanoeoKd9ZOA=; b=1YzlOpCkM6QxOV noWeBnbD5/ngqxIArwwjA3BAhTa1DWMnGjaFpiXq3IFLqLNlQctJQIa1uVAdfknLWca1CMy04Tfp3 0ZGgeb8ayv0R9fMWZUwOJnVO97+jdIOkc9lVn99AbaNUgQV2oom8AhupPJsmAFMfAfWLMy74DBVUS unqN004QA6Jik51WITh72EZ7ql8q1zHV3TV0SBsWtK/0OsONX18kEUrKFxC5VuHzij2IxnAc89lpN KrBfU31DndpImpzD6g8UCf4uLHCiNSvXFgB1TXWGpwzmtlwXOw3W6Cz5oLYWPo0bnJLagA8VqgtFY sAkczjce31MO6Pdi8+SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzGQa-001MVI-4B; Thu, 09 Jun 2022 11:34:16 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzGP0-001LpX-Nh for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 11:32:40 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 21B91B82C7E; Thu, 9 Jun 2022 11:32:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81810C34114; Thu, 9 Jun 2022 11:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654774354; bh=KrCsS5l82GZCvOtjV+ccEYhWmRYIStLBFNTaPu6W0wY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NcILwukIegunEGj6vknqW1TFQuzHnca9cROZL6SEvL9xaU0xgRVK3GgB577VtZUym eKYP2GHVAaU0U8hYDdpaOLFO2bYr+L1Z96Nbk548oDef1BRph5j8kxKVMMgEl5C9ps OdROfGRpbpU0Us7+u7Xwo2fE+kaxgYxUYvMOa1hnrO+oascfJUxOE/HTZpfqJZjXuo 8mRk3HTeK0l79rq2BblGMGI10Oum0Lu5Dy7ivj2BBy9/ayA6iJMljU4YvV9ugahcoI VMhf6GKnDpPr2W8NnL4Wn94OryXOXH0+xvaHG4ciktsn5nI78H7MTsBUdo1jdmS8kl oOut3UHKnlDYw== Date: Thu, 9 Jun 2022 12:32:28 +0100 From: Will Deacon To: Srinivasarao Pathipati Cc: mark.rutland@arm.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V5] arm64: perf: Make exporting of pmu events configurable Message-ID: <20220609113225.GA2326@willie-the-truck> References: <1653306574-20946-1-git-send-email-quic_c_spathi@quicinc.com> <20220609100247.GA2187@willie-the-truck> <4f5dbc00-e25b-f6ff-8585-31fc50f48a21@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4f5dbc00-e25b-f6ff-8585-31fc50f48a21@quicinc.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_043239_022368_506C32E7 X-CRM114-Status: GOOD ( 20.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [Please don't top-post] On Thu, Jun 09, 2022 at 04:05:20PM +0530, Srinivasarao Pathipati wrote: > On 6/9/2022 3:32 PM, Will Deacon wrote: > > On Mon, May 23, 2022 at 05:19:34PM +0530, Srinivasarao Pathipati wrote: > > > The PMU export bit (PMCR_EL0.X) is getting reset during pmu reset, > > > Make is configurable using sysctls to enable/disable at runtime. > > > It can also be enabled at early bootup with kernel arguments. > > > > > > Signed-off-by: Srinivasarao Pathipati > > > --- > > > Changes since V4: > > > - Registering sysctls dynamically for only arm64 as suggested by Will > > > - Not removed the code to configure with kernel parameters > > > as the sysctl's kernel parameter(sysctl.kernel.export_pmu_events) > > > is not working at early bootup. pmu_reset() getting called before > > > sysctl's kernel parameter is set. > > Why do you need this during early bootup? Perf won't program any events > > until much later and if somebody else is configuring the PMU before > > entering Linux then they can also set that X bit in the PMCR. > > On our Qualcomm platforms, The X bit is getting set by firmware at early > bootup for Qualcomm use cases > and non-secure world is resetting it, that causing issue. What "Qualcomm use cases" and why should we care about them upstream? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel