From: sashiko-bot@kernel.org
To: "Myria Sarvay" <myrialsarvay@gmail.com>
Cc: linux-perf-users@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 13/13] arm64: dts: apple: t8140: Add PMU Device Nodes
Date: Tue, 03 Nov 2026 11:23:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-195140@kernel.org> (raw)
In-Reply-To: <20261103-m3-plus-pmu-events-v1-13-a8eb6c1139fe@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: apple: t8140: missing aic affinities node for pmu-e and pmu-p
--
commit 4dff2446440e6919eaaded721e0e1ce1b3461270
Author: Myria Sarvay <myrialsarvay@gmail.com>
arm64: dts: apple: t8140: Add PMU Device Nodes
This commit adds the pmu-e and pmu-p device nodes for the efficiency and
performance core PMUs to the Apple t8140 device tree.
> diff --git a/arch/arm64/boot/dts/apple/t8140.dtsi b/arch/arm64/boot/dts/apple/t8140.dtsi
> index 150d91bdf6fcc..6e6fd5754406b 100644
> --- a/arch/arm64/boot/dts/apple/t8140.dtsi
> +++ b/arch/arm64/boot/dts/apple/t8140.dtsi
> @@ -136,6 +136,18 @@ l2_cache_1: l2-cache-1 {
> };
> };
>
> + pmu-e {
> + compatible = "apple,tahiti-e-pmu";
> + interrupt-parent = <&aic>;
> + interrupts = <AIC_FIQ AIC_CPU_PMU_E IRQ_TYPE_LEVEL_HIGH>;
> + };
> +
> + pmu-p {
> + compatible = "apple,tahiti-p-pmu";
> + interrupt-parent = <&aic>;
> + interrupts = <AIC_FIQ AIC_CPU_PMU_P IRQ_TYPE_LEVEL_HIGH>;
> + };
[Severity: High]
Does adding pmu-e and pmu-p also require an affinities child node under the
aic interrupt controller in arch/arm64/boot/dts/apple/t8140.dtsi (matching
t8122.dtsi and t8132.dtsi)?
Currently, the aic node in t8140.dtsi does not define an affinities subnode:
aic: interrupt-controller@301000000 {
compatible = "apple,t8140-aic3", "apple,t8122-aic3";
reg = <0x3 0x01000000 0x0 0x1cc000>,
<0x3 0x01040000 0x0 0x4000>;
reg-names = "core", "event";
#interrupt-cells = <3>;
interrupt-controller;
power-domains = <&ps_aic>;
};
Without the affinities node, aic_of_ic_init() in
drivers/irqchip/irq-apple-aic.c leaves aic_irqc->fiq_aff[AIC_CPU_PMU_E] and
aic_irqc->fiq_aff[AIC_CPU_PMU_P] as NULL. When arm_pmu_device_probe() ->
pmu_parse_irqs() -> platform_get_irq_affinity() queries the interrupt
affinity, aic_irq_get_fwspec_info() falls back to cpu_possible_mask for both
PMUs:
if (aic_irqc->fiq_aff[intid])
mask = &aic_irqc->fiq_aff[intid]->aff;
else
mask = cpu_possible_mask;
This causes pmu_parse_percpu_irq() to populate pmu->supported_cpus with all
CPUs (both E-cores and P-cores) on both PMU instances, breaking heterogeneous
CPU filtering in armpmu_filter() and armpmu_event_init().
In addition, because aic_irq_domain_translate() merges AIC_CPU_PMU_E onto
AIC_CPU_PMU_P so both PMUs share the same Linux virq, the second PMU to probe
sees armpmu_count_irq_users(affinity, irq) != 0 in armpmu_request_irq()
(drivers/perf/arm_pmu.c) and skips registering its per-CPU interrupt handler:
} else if (armpmu_count_irq_users(affinity, irq) == 0) {
err = request_percpu_nmi(irq, handler, "arm-pmu", affinity, pcpu_armpmu);
/* If cannot get an NMI, get a normal interrupt */
if (err) {
err = request_percpu_irq_affinity(irq, handler, "arm-pmu",
affinity, pcpu_armpmu);
irq_ops = &percpu_pmuirq_ops;
} else {
has_nmi = true;
irq_ops = &percpu_pmunmi_ops;
}
} else {
/* Per cpudevid irq was already requested by another CPU */
irq_ops = armpmu_find_irq_ops(affinity, irq);
When a P-core PMU counter overflow FIQ fires, handle_percpu_devid_irq()
dispatches it to pmu-e's handler instead of pmu-p's, leaving the P-core
counter unhandled and triggering an FIQ storm.
Should the aic node in t8140.dtsi include an affinities subnode mapping
AIC_CPU_PMU_E to <&cpu_e0>, <&cpu_e1>, <&cpu_e2>, <&cpu_e3> and AIC_CPU_PMU_P
to <&cpu_p0>, <&cpu_p1>?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-m3-plus-pmu-events-v1-0-a8eb6c1139fe@gmail.com?part=13
prev parent reply other threads:[~2026-11-03 11:23 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 10:14 [PATCH 00/13] drivers/perf: apple_m1: Add M3/M4/A18 Pro Support Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:14 ` [PATCH 01/13] dt-bindings: arm: pmu: Add Apple M3/M4/A18 Pro SoC CPU PMU compatibles Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:19 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 02/13] drivers/perf: apple_m1: Remove unused variables Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:21 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 03/13] drivers/perf: apple_m1: Support per-implementation event tables Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:22 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 04/13] drivers/perf: apple_m1: Support per-implementation event size Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:25 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 05/13] drivers/perf: apple_m1: Use macros for per-implementation init functions Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:31 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 06/13] drivers/perf: apple_m1: Add Apple M3 Series Support Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:37 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 07/13] drivers/perf: apple_m1: Add Apple M4 " Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:43 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 08/13] drivers/perf: apple_m1: Add Apple A18 Support Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:47 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 09/13] arm64: dts: apple: t603x: Add PMU Device Nodes Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 10:54 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 10/13] arm64: dts: apple: t8122: " Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 11:03 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 11/13] arm64: dts: apple: t604x: " Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 11:12 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 12/13] arm64: dts: apple: t8132: " Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 11:14 ` sashiko-bot
2026-11-03 10:14 ` [PATCH 13/13] arm64: dts: apple: t8140: " Myria Sarvay via B4 Relay
2026-11-03 10:14 ` Myria Sarvay
2026-11-03 11:23 ` sashiko-bot [this message]
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=sashiko-outbox-195140@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=myrialsarvay@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.