From: sashiko-bot@kernel.org
To: "Leo Yan" <leo.yan@arm.com>
Cc: devicetree@vger.kernel.org, linux-perf-users@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/8] perf/arm_pmu: Register ACPI SPE and TRBE devices with software nodes
Date: Mon, 16 Nov 2026 18:38:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-217507@kernel.org> (raw)
In-Reply-To: <20261116-acpi_arm_pmu_registration_hmp-v1-3-0371d4eca626@arm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] perf/arm_pmu: arm_acpi_alloc_pmu_groups() fails and warns on
older MADT tables
--
commit 0dc63259559ab5780db0b0b7b9fa3866f77b52f2
Author: Johnny.Fan <johnny.fan@cixtech.com>
perf/arm_pmu: Register ACPI SPE and TRBE devices with software nodes
This commit groups initialized CPUs by MIDR and registers one SPE or TRBE
platform device per group with a software node describing its IRQ
affinity.
> diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
> index ca6bf8f86cfe9..7ae291acb0452 100644
> --- a/drivers/perf/arm_pmu_acpi.c
> +++ b/drivers/perf/arm_pmu_acpi.c
[ ... ]
> @@ -68,92 +72,297 @@ static void arm_pmu_acpi_unregister_irq(int cpu)
[ ... ]
> +static struct arm_pmu_acpi_group **
> +arm_acpi_alloc_pmu_groups(const struct arm_pmu_acpi_device_info *info,
> + int *nr_groups_out)
> +{
> + struct arm_pmu_acpi_group **groups;
> + int cpu, nr_groups = 0;
> +
> + *nr_groups_out = 0;
> +
> + groups = kcalloc(num_possible_cpus(), sizeof(*groups), GFP_KERNEL);
> + if (!groups)
> + return NULL;
>
> - /*
> - * Sanity check all the GICC tables for the same interrupt
> - * number. For now, only support homogeneous ACPI machines.
> - */
> for_each_possible_cpu(cpu) {
> struct acpi_madt_generic_interrupt *gicc;
> + struct arm_pmu_acpi_group *group;
> + u32 gsi;
> +
> + /* CPUs that have never booted have no saved MIDR */
> + if (!per_cpu(cpu_data, cpu).reg_midr)
> + continue;
>
> gicc = acpi_cpu_get_madt_gicc(cpu);
> - if (gicc->header.length < len)
> - return gsi ? -ENXIO : 0;
> -
> - this_gsi = parse_gsi(gicc);
> - this_hetid = find_acpi_cpu_topology_hetero_id(cpu);
> - if (!gsi) {
> - hetid = this_hetid;
> - gsi = this_gsi;
> - } else if (hetid != this_hetid || gsi != this_gsi) {
> - pr_warn("ACPI: %s: must be homogeneous\n", pdev->name);
> - return -ENXIO;
> + if (gicc->header.length < info->len) {
> + pr_warn("ACPI: %s: miss GICC entries\n", info->name);
> + goto out_free;
> }
[Severity: Medium]
Does this cause spurious boot warnings on platforms with older MADT
revisions?
Previously, gicc->header.length < len returned 0 silently when no prior
CPU had advertised a non-zero GSI. Now, on systems with MADT GICC entries
predating ACPI 6.3 (for SPE) or ACPI 6.5 (for TRBE),
arm_acpi_alloc_pmu_groups() logs a warning and returns NULL, which
arm_acpi_register_pmu_devices() turns into -ENOMEM and a second "Unable
to register device" warning in arm_spe_acpi_register_device() and
arm_trbe_acpi_register_device().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-acpi_arm_pmu_registration_hmp-v1-0-0371d4eca626@arm.com?part=3
next prev parent reply other threads:[~2026-11-16 18:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 18:21 [PATCH 0/8] ACPI: arm64: Support PMU on Heterogeneous Systems Leo Yan
2026-11-16 18:21 ` [PATCH 1/8] device property: Add firmware node IRQ affinity callbacks Leo Yan
2026-11-16 18:28 ` sashiko-bot
2026-11-16 18:21 ` [PATCH 2/8] device property: Add software-node IRQ affinity masks Leo Yan
2026-11-16 18:29 ` sashiko-bot
2026-11-16 18:21 ` [PATCH 3/8] perf/arm_pmu: Register ACPI SPE and TRBE devices with software nodes Leo Yan
2026-11-16 18:38 ` sashiko-bot [this message]
2026-11-16 18:21 ` [PATCH 4/8] perf/arm_pmu: Prepare ACPI registration for per-CPU interrupts Leo Yan
2026-11-16 18:29 ` sashiko-bot
2026-11-16 18:21 ` [PATCH 5/8] perf/arm_pmu: Register ACPI CPU PMUs as platform devices Leo Yan
2026-11-16 18:44 ` sashiko-bot
2026-11-16 18:21 ` [PATCH 6/8] perf/arm_pmu: Support ACPI devices in the platform probe Leo Yan
2026-11-16 18:36 ` sashiko-bot
2026-11-16 18:21 ` [PATCH 7/8] perf/arm_pmu: Use ACPI CPU affinity in IRQ handling Leo Yan
2026-11-16 18:34 ` sashiko-bot
2026-11-16 18:21 ` [PATCH 8/8] ACPI: arm64: Move PMU device registration to drivers/acpi/arm64/ Leo Yan
2026-11-16 18:37 ` sashiko-bot
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-217507@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-perf-users@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox