[PATCH v3 1/5] perf/arm_cspmu: Add arm_cspmu_acpi_dev_get
Suzuki K Poulose
suzuki.poulose at arm.com
Tue Sep 30 06:05:10 PDT 2025
On 30/09/2025 14:00, Besar Wicaksono wrote:
>
>
>> -----Original Message-----
>> From: Suzuki K Poulose <suzuki.poulose at arm.com>
>> Sent: Tuesday, September 30, 2025 3:38 AM
>> To: Besar Wicaksono <bwicaksono at nvidia.com>; will at kernel.org;
>> robin.murphy at arm.com; ilkka at os.amperecomputing.com
>> Cc: linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; linux-
>> tegra at vger.kernel.org; mark.rutland at arm.com; Thierry Reding
>> <treding at nvidia.com>; Jon Hunter <jonathanh at nvidia.com>; Vikram Sethi
>> <vsethi at nvidia.com>; Rich Wiley <rwiley at nvidia.com>; Shanker Donthineni
>> <sdonthineni at nvidia.com>
>> Subject: Re: [PATCH v3 1/5] perf/arm_cspmu: Add arm_cspmu_acpi_dev_get
>>
>> External email: Use caution opening links or attachments
>>
>>
>> On 30/09/2025 01:26, Besar Wicaksono wrote:
>> > Add interface to get ACPI device associated with the
>> > PMU. This ACPI device may contain additional properties
>> > not covered by the standard properties.
>> >
>> > Signed-off-by: Besar Wicaksono <bwicaksono at nvidia.com>
>>
>> Repeat: Where is the user ?
>
> I thought you were okay if the use case is on future (different) series.
>
> So, this is a heads up on what I will have in nvidia_cspmu when adding the
> new PMU support. Do you prefer it to be part of this series?
No, I recommended the opposite. Apologies, if that wasn't clear.
Add a helper only when there is a user.
Suzuki
>
> +static u32 nv_cspmu_get_inst_id(const struct arm_cspmu *cspmu)
>
> +{
>
> + u32 inst_id;
>
> + struct fwnode_handle *fwnode;
>
> + struct acpi_device *adev;
>
> +
>
> + inst_id = 0;
>
> +
>
> + adev = arm_cspmu_acpi_dev_get(cspmu);
>
> + if (!adev)
>
> + return 0;
>
> +
>
> + fwnode = acpi_fwnode_handle(adev);
>
> + if (fwnode && fwnode_property_read_u32(fwnode, "instance_id",
> &inst_id))
>
> + kstrtou32(acpi_device_uid(adev), 0, &inst_id);
>
> +
>
> + acpi_dev_put(adev);
>
> + return inst_id;
>
> +}
>
> Thanks,
> Besar
>
>
More information about the linux-arm-kernel
mailing list