[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu()
- To: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>
- From: Chengwen Feng <fengchengwen@xxxxxxxxxx>
- Date: Fri, 20 Mar 2026 11:17:35 +0800
- Cc: Jonathan Corbet <corbet@xxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "H . Peter Anvin" <hpa@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, Sunil V L <sunilvl@xxxxxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>, Yanteng Si <si.yanteng@xxxxxxxxx>, Sean Christopherson <seanjc@xxxxxxxxxx>, Kai Huang <kai.huang@xxxxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, Thorsten Blum <thorsten.blum@xxxxxxxxx>, Kevin Loughlin <kevinloughlin@xxxxxxxxxx>, Zheyun Shen <szy0127@xxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>, Xin Li <xin@xxxxxxxxx>, "Ahmed S . Darwish" <darwi@xxxxxxxxxxxxx>, Sohil Mehta <sohil.mehta@xxxxxxxxx>, Ilkka Koskinen <ilkka@xxxxxxxxxxxxxxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, James Clark <james.clark@xxxxxxxxxx>, Besar Wicaksono <bwicaksono@xxxxxxxxxx>, Ma Ke <make24@xxxxxxxxxxx>, Wei Huang <wei.huang2@xxxxxxx>, Andy Gospodarek <andrew.gospodarek@xxxxxxxxxxxx>, Somnath Kotur <somnath.kotur@xxxxxxxxxxxx>, <punit.agrawal@xxxxxxxxxxxxxxxx>, <guohanjun@xxxxxxxxxx>, <suzuki.poulose@xxxxxxx>, <ryan.roberts@xxxxxxx>, <chenl311@xxxxxxxxxxxxxxx>, <masahiroy@xxxxxxxxxx>, <wangyuquan1236@xxxxxxxxxxxxxx>, <anshuman.khandual@xxxxxxx>, <heinrich.schuchardt@xxxxxxxxxxxxx>, <Eric.VanTassell@xxxxxxx>, <wangzhou1@xxxxxxxxxxxxx>, <wanghuiqiang@xxxxxxxxxx>, <liuyonglong@xxxxxxxxxx>, <fengchengwen@xxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, <linux-doc@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <loongarch@xxxxxxxxxxxxxxx>, <linux-riscv@xxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-acpi@xxxxxxxxxxxxxxx>, <linux-perf-users@xxxxxxxxxxxxxxx>, <stable@xxxxxxxxxxxxxxx>
- Delivery-date: Fri, 20 Mar 2026 03:18:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Update arm_cspmu to use acpi_get_cpu_uid() instead of
get_acpi_id_for_cpu(), aligning with unified ACPI CPU UID interface.
No functional changes are introduced by this switch (valid inputs retain
original behavior).
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Chengwen Feng <fengchengwen@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
---
drivers/perf/arm_cspmu/arm_cspmu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c
b/drivers/perf/arm_cspmu/arm_cspmu.c
index 34430b68f602..ed72c3d1f796 100644
--- a/drivers/perf/arm_cspmu/arm_cspmu.c
+++ b/drivers/perf/arm_cspmu/arm_cspmu.c
@@ -1107,15 +1107,17 @@ static int arm_cspmu_acpi_get_cpus(struct arm_cspmu
*cspmu)
{
struct acpi_apmt_node *apmt_node;
int affinity_flag;
+ u32 cpu_uid;
int cpu;
+ int ret;
apmt_node = arm_cspmu_apmt_node(cspmu->dev);
affinity_flag = apmt_node->flags & ACPI_APMT_FLAGS_AFFINITY;
if (affinity_flag == ACPI_APMT_FLAGS_AFFINITY_PROC) {
for_each_possible_cpu(cpu) {
- if (apmt_node->proc_affinity ==
- get_acpi_id_for_cpu(cpu)) {
+ ret = acpi_get_cpu_uid(cpu, &cpu_uid);
+ if (ret == 0 && apmt_node->proc_affinity == cpu_uid) {
cpumask_set_cpu(cpu, &cspmu->associated_cpus);
break;
}
--
2.17.1
|