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 0D8A5C71157 for ; Tue, 17 Jun 2025 17:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=D7dfNAqHAMhQ1OFXBNUVVaIUCT2T67QAOx3p3dGghhM=; b=NV0fW8egv1osAexU5rJ4siTbw/ UsZ/yVA/xhFEt8u8D7HLiNpUPg25vZPuW0+bnEcjR7miypP/8FciWMNsZNG/JHsKXovtmVNYUJ6R8 R9g3qjP4xRAxT9mHogaxXFdn3Jp4o1sqAzlxm6lAfCy7ipp3BnvV6VW3WNGDcDn1YuTR6wUwtvM8+ SywuEcQjv9PrJ5sZ6g2+LEPFGYHjiNKOpeD1kiPndmyOtzvlW99Q6ETx3WbJ5iu0/urBrR/d8PoHt QeQuqTOZJnu5ATBw4Yi7j0kh1+rsu0z4A7gdPBuuic+50iBjPLUrfiYxZ8f4z3k/AkCfC4K3l7ep1 VqNxOb7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRZs0-0000000810S-2waa; Tue, 17 Jun 2025 17:13:12 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRZTW-00000007vDI-2hEE for linux-arm-kernel@lists.infradead.org; Tue, 17 Jun 2025 16:47:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 0D98F629C5; Tue, 17 Jun 2025 16:47:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2A59C4CEF1; Tue, 17 Jun 2025 16:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750178873; bh=bv8Bxsp+wqUnaImph/LN5QBdG6peA6A2txdgC3zX1MM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZNMyLSTPok0plXtSQRVeR35mIMWYttQFoRsg7101Exfaxx1j63e8bHq3iq0fCYdA6 OH7chKtVrGN5wyiqnbwzMjJ51fAUeVh0HD/d9BtnX7Tdda6qRUyLCtQnMQe3l3+WCL RdmE8gciBbPjRV3a+FqVrSNKq4SNPlPma+bcbVvKvRGlLybuQvDg8gp9sespTNU+FV P1a/thpRNVyfkRhuXXyY5SDGaduXEKPM/7zuD8QnyxuOP6RzVrJBllDZX9DS8IcGH/ XnfDZGefPxk6LQcSEzhksczVblQuPZ+Is8ABsU8bgj5RWP0o+5pgpeeUbUKoRrofPD 04cq6am1mjGUw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uRZTT-007eVr-5s; Tue, 17 Jun 2025 17:47:51 +0100 Date: Tue, 17 Jun 2025 17:47:50 +0100 Message-ID: <86msa6co21.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: Ian Rogers , Nick Chan , Mark Rutland , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Janne Grunau , Alyssa Rosenzweig , Neal Gompa , Sven Peter , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, devicetree@vger.kernel.org, asahi@lists.linux.dev, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: Re: [PATCH RESEND v7 00/21] drivers/perf: apple_m1: Add Apple A7-A11, T2 SoC support In-Reply-To: <20250617141649.GA19021@willie-the-truck> References: <20250616-apple-cpmu-v7-0-df2778a44d5c@gmail.com> <20250616102945.GA17431@willie-the-truck> <20250617141649.GA19021@willie-the-truck> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, irogers@google.com, towinchenmi@gmail.com, mark.rutland@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, catalin.marinas@arm.com, j@jannau.net, alyssa@rosenzweig.io, neal@gompa.dev, sven@kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, devicetree@vger.kernel.org, asahi@lists.linux.dev, linux-kernel@vger.kernel.org, krzysztof.kozlowski@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 17 Jun 2025 15:16:50 +0100, Will Deacon wrote: >=20 > On Mon, Jun 16, 2025 at 03:44:49AM -0700, Ian Rogers wrote: > > On Mon, Jun 16, 2025 at 3:29=E2=80=AFAM Will Deacon w= rote: > > > > > > On Mon, Jun 16, 2025 at 02:36:18AM -0700, Ian Rogers wrote: > > > > On Sun, Jun 15, 2025 at 6:32=E2=80=AFPM Nick Chan wrote: > > > > > > > > > > This series adds support for the CPU PMU in the older Apple A7-A1= 1, T2 > > > > > SoCs. These PMUs may have a different event layout, less counters= , or > > > > > deliver their interrupts via IRQ instead of a FIQ. Since some of = those > > > > > older SoCs support 32-bit EL0, counting for 32-bit EL0 also need = to > > > > > be enabled by the driver where applicable. > > > > > > > > > > Patch 1 adds the DT bindings. > > > > > Patch 2-7 prepares the driver to allow adding support for those > > > > > older SoCs. > > > > > Patch 8-12 adds support for the older SoCs. > > > > > Patch 13-21 are the DT changes. > > > > > > > > > > Signed-off-by: Nick Chan > > > > > > > > Hi Nick, > > > > > > > > This is substantial work and it looks good to me. Do you know why > > > > there's been little progress on landing these patches? Buggy Apple = ARM > > > > PMU support in the kernel has led to reworking the perf tool. It se= ems > > > > best that we can have the best drivers possible. > > > > > > You reworked the perf tool to support these things? Why? These changes > > > are targetting chips in old iPhones afaict (as opposed to "Apple Sili= con"). > > > I think that (a) most people don't particularly care about them and (= b) > > > they're not fully supported _anyway_ because of crazy stuff like [1]. > >=20 > > I was meaning that we reworked the perf tool to work around the Apple > > ARM PMU driver expecting to work as if it were an uncore rather than a > > core PMU driver. More context here: > > "[REGRESSION] Perf (userspace) broken on big.LITTLE systems since v6.5" > > https://lore.kernel.org/lkml/08f1f185-e259-4014-9ca4-6411d5c1bc65@marca= n.st/ > > But in general it would be nice Apple ARM PMU support were well loved. > > I think we went 2 or 3 minor releases with the perf tool not working, > > threats of substantial reverts to avoid the PMU driver bug being > > exposed, etc. >=20 > It's unfortunate that you've had a torrid time with the Apple PMU driver, > but I think it's important to realise that it's both unmaintained (it > ends up with me via the catch-all for drivers/perf/) and was written > based off whatever reverse-engineering people could be bothered to do in > their spare time. It's frankly remarkable that it works as well as it > does. Also, the "broken" driver actually works as expected. Ian blames the userspace breakage on that driver, but that's only because the way we deal with PMUs on ARM doesn't match his mental model. Oh well. M. --=20 Without deviation from the norm, progress is not possible.