From: Robin Murphy <robin.murphy@arm.com>
To: will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com
Cc: ilkka@os.amperecomputing.com, bwicaksono@nvidia.com,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Hanjun Guo <guohanjun@huawei.com>,
Sudeep Holla <sudeep.holla@kernel.org>
Subject: Re: [PATCH 1/4] ACPI/APMT: Use stable device ID
Date: Thu, 9 Jul 2026 16:31:00 +0100 [thread overview]
Message-ID: <2a1ed630-3f88-400e-85cc-596b4dd5f5a8@arm.com> (raw)
In-Reply-To: <c113eff51124250fc5798589ce905052046b43b3.1783605641.git.robin.murphy@arm.com>
On 09/07/2026 3:39 pm, Robin Murphy wrote:
> The APMT node format includes a unique identifier, so we can use this as
> the platform device ID to give userspace stable and identifiable device
> names, rather than auto numbering dependent on how the table is parsed.
>
> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Hanjun Guo <guohanjun@huawei.com>
> Cc: Sudeep Holla <sudeep.holla@kernel.org>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/acpi/arm64/apmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/arm64/apmt.c b/drivers/acpi/arm64/apmt.c
> index bb010f6164e5..ba48fcb26d52 100644
> --- a/drivers/acpi/arm64/apmt.c
> +++ b/drivers/acpi/arm64/apmt.c
> @@ -79,7 +79,7 @@ static int __init apmt_add_platform_device(struct acpi_apmt_node *node,
> int ret, count;
> struct resource res[DEV_MAX_RESOURCE_COUNT];
>
> - pdev = platform_device_alloc(DEV_NAME, PLATFORM_DEVID_AUTO);
> + pdev = platform_device_alloc(DEV_NAME, node->id);
Per the Sashiko comment, while I really wouldn't expect it to be an
issue in practice, I guess we could explicitly check and truncate
node->id to INT_MAX (probably with some degree of warning) here just in
case.
Cheers,
Robin.
> if (!pdev)
> return -ENOMEM;
>
next prev parent reply other threads:[~2026-07-09 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 14:39 [PATCH 0/4] perf/arm_cspmu: Miscellaneous improvements Robin Murphy
2026-07-09 14:39 ` [PATCH 1/4] ACPI/APMT: Use stable device ID Robin Murphy
2026-07-09 14:52 ` sashiko-bot
2026-07-09 15:31 ` Robin Murphy [this message]
2026-07-09 14:39 ` [PATCH 2/4] perf/arm_cspmu: Improve APMT-based PMU naming Robin Murphy
2026-07-09 14:48 ` sashiko-bot
2026-07-09 15:42 ` Robin Murphy
2026-07-09 14:39 ` [PATCH 3/4] perf/arm_cspmu: Improve sub-module error reporting Robin Murphy
2026-07-09 14:39 ` [PATCH 4/4] perf/arm_cspmu: Make IRQ more optional Robin Murphy
2026-07-09 14:49 ` 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=2a1ed630-3f88-400e-85cc-596b4dd5f5a8@arm.com \
--to=robin.murphy@arm.com \
--cc=bwicaksono@nvidia.com \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=ilkka@os.amperecomputing.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=sudeep.holla@kernel.org \
--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