From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com,
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: Sun, 12 Jul 2026 22:46:27 -0700 (PDT) [thread overview]
Message-ID: <b79dad48-0a70-5e27-d074-38df81367485@os.amperecomputing.com> (raw)
In-Reply-To: <2a1ed630-3f88-400e-85cc-596b4dd5f5a8@arm.com>
On Thu, 9 Jul 2026, Robin Murphy wrote:
> 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.
That's a good idea.
>>
>> 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.
Yeah, it probably and hopefully won't happen but it makes sense to have a
warning message regardless. With it
Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Cheers, Ilkka
>
> Cheers,
> Robin.
>
>> if (!pdev)
>> return -ENOMEM;
>>
>
>
next prev parent reply other threads:[~2026-07-13 5:46 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 15:31 ` Robin Murphy
2026-07-13 5:46 ` Ilkka Koskinen [this message]
2026-07-09 14:39 ` [PATCH 2/4] perf/arm_cspmu: Improve APMT-based PMU naming Robin Murphy
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-13 6:13 ` Ilkka Koskinen
2026-07-09 14:39 ` [PATCH 4/4] perf/arm_cspmu: Make IRQ more optional Robin Murphy
2026-07-13 6:32 ` Ilkka Koskinen
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=b79dad48-0a70-5e27-d074-38df81367485@os.amperecomputing.com \
--to=ilkka@os.amperecomputing.com \
--cc=bwicaksono@nvidia.com \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.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=robin.murphy@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