Thread (40 messages) 40 messages, 5 authors, 2025-07-18

Re: [PATCH RESEND v7 00/21] drivers/perf: apple_m1: Add Apple A7-A11, T2 SoC support

From: Will Deacon <will@kernel.org>
Date: 2025-06-17 14:16:56
Also in: asahi, linux-arm-kernel, linux-perf-users, lkml

On Mon, Jun 16, 2025 at 03:44:49AM -0700, Ian Rogers wrote:
On Mon, Jun 16, 2025 at 3:29 AM Will Deacon [off-list ref] wrote:
quoted
On Mon, Jun 16, 2025 at 02:36:18AM -0700, Ian Rogers wrote:
quoted
On Sun, Jun 15, 2025 at 6:32 PM Nick Chan [off-list ref] wrote:
quoted
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 <redacted>
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/ (local)
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.

Despite all of that, I still don't think that your concerns apply to the
patches in _this_ series, which is about adding support for older Apple
chips.
As for which Apple ARM devices should have perf support, it seems the
more the merrier.
Easy to say when you don't have to maintain the driver!

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help