linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Will Deacon <will@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Nick Chan <towinchenmi@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Janne Grunau <j@jannau.net>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Neal Gompa <neal@gompa.dev>, Sven Peter <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 <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH RESEND v7 00/21] drivers/perf: apple_m1: Add Apple A7-A11, T2 SoC support
Date: Tue, 17 Jun 2025 17:47:50 +0100	[thread overview]
Message-ID: <86msa6co21.wl-maz@kernel.org> (raw)
In-Reply-To: <20250617141649.GA19021@willie-the-truck>

On Tue, 17 Jun 2025 15:16:50 +0100,
Will Deacon <will@kernel.org> wrote:
> 
> On Mon, Jun 16, 2025 at 03:44:49AM -0700, Ian Rogers wrote:
> > On Mon, Jun 16, 2025 at 3:29 AM Will Deacon <will@kernel.org> wrote:
> > >
> > > On Mon, Jun 16, 2025 at 02:36:18AM -0700, Ian Rogers wrote:
> > > > On Sun, Jun 15, 2025 at 6:32 PM Nick Chan <towinchenmi@gmail.com> wrote:
> > > > >
> > > > > This series adds support for the CPU PMU in the older Apple A7-A11, 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 <towinchenmi@gmail.com>
> > > >
> > > > 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 seems
> > > > 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 Silicon").
> > > 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].
> > 
> > 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@marcan.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.
> 
> 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.

-- 
Without deviation from the norm, progress is not possible.


  parent reply	other threads:[~2025-06-17 17:13 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  1:31 [PATCH RESEND v7 00/21] drivers/perf: apple_m1: Add Apple A7-A11, T2 SoC support Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 01/21] dt-bindings: arm: pmu: Add Apple A7-A11 SoC CPU PMU compatibles Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 02/21] drivers/perf: apple_m1: Only init PMUv3 remap when EL2 is available Nick Chan
2025-07-14 15:11   ` Will Deacon
2025-07-14 15:37     ` Nick Chan
2025-07-17 15:16       ` Will Deacon
2025-06-16  1:31 ` [PATCH RESEND v7 03/21] drivers/perf: apple_m1: Support per-implementation event tables Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 04/21] drivers/perf: apple_m1: Support a per-implementation number of counters Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 05/21] drivers/perf: apple_m1: Support configuring counters for 32-bit EL0 Nick Chan
2025-07-14 15:12   ` Will Deacon
2025-06-16  1:31 ` [PATCH RESEND v7 06/21] drivers/perf: apple_m1: Support per-implementation PMU startup Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 07/21] drivers/perf: apple_m1: Support per-implementation event attr group Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 08/21] drivers/perf: apple_m1: Add Apple A7 support Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 09/21] drivers/perf: apple_m1: Add Apple A8/A8X support Nick Chan
2025-06-16  1:31 ` [PATCH RESEND v7 10/21] drivers/perf: apple_m1: Add A9/A9X support Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 11/21] drivers/perf: apple_m1: Add Apple A10/A10X/T2 Support Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 12/21] drivers/perf: apple_m1: Add Apple A11 Support Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 13/21] arm64: dts: apple: s5l8960x: Add CPU PMU nodes Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 14/21] arm64: dts: apple: t7000: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 15/21] arm64: dts: apple: t7001: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 16/21] arm64: dts: apple: s800-0-3: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 17/21] arm64: dts: apple: s8001: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 18/21] arm64: dts: apple: t8010: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 19/21] arm64: dts: apple: t8011: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 20/21] arm64: dts: apple: t8012: " Nick Chan
2025-06-16  1:32 ` [PATCH RESEND v7 21/21] arm64: dts: apple: t8015: " Nick Chan
2025-06-16  9:36 ` [PATCH RESEND v7 00/21] drivers/perf: apple_m1: Add Apple A7-A11, T2 SoC support Ian Rogers
2025-06-16 10:29   ` Will Deacon
2025-06-16 10:44     ` Ian Rogers
2025-06-17 14:16       ` Will Deacon
2025-06-17 16:28         ` Ian Rogers
2025-06-17 16:47         ` Marc Zyngier [this message]
2025-06-17 16:53           ` Ian Rogers
2025-06-16 10:35   ` Nick Chan
2025-07-14 15:12 ` Will Deacon
2025-07-14 15:59   ` Nick Chan
2025-07-17 15:05     ` Mark Rutland
2025-07-17 17:00       ` Nick Chan
2025-07-18 15:01         ` Mark Rutland
2025-07-18 20:45           ` Nick Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86msa6co21.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=irogers@google.com \
    --cc=j@jannau.net \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=neal@gompa.dev \
    --cc=robh@kernel.org \
    --cc=sven@kernel.org \
    --cc=towinchenmi@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).