[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250512080715.82-6-alireza.sanaee@huawei.com>
Date: Mon, 12 May 2025 09:07:13 +0100
From: Alireza Sanaee <alireza.sanaee@...wei.com>
To: <devicetree@...r.kernel.org>
CC: <robh@...nel.org>, <alireza.sanaee@...wei.com>,
<jonathan.cameron@...wei.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
<mark.rutland@....com>, <shameerali.kolothum.thodi@...wei.com>,
<krzk@...nel.org>, <dianders@...omium.org>, <catalin.marinas@....com>,
<suzuki.poulose@....com>, <mike.leach@...aro.org>, <james.clark@...aro.org>,
<linux-perf-users@...r.kernel.org>, <coresight@...ts.linaro.org>,
<gshan@...hat.com>, <ruanjinjie@...wei.com>, <saravanak@...gle.com>
Subject: [PATCH v3 5/7] perf/arm-dsu: refactor cpu id retrieval via new API of_cpu_phandle_to_id
Update arm-dsu to use the new API, where both "cpus" and "cpu"
properties are supported.
Signed-off-by: Alireza Sanaee <alireza.sanaee@...wei.com>
---
drivers/perf/arm_dsu_pmu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c
index cb4fb59fe04b..7ef204d39173 100644
--- a/drivers/perf/arm_dsu_pmu.c
+++ b/drivers/perf/arm_dsu_pmu.c
@@ -596,11 +596,9 @@ static int dsu_pmu_dt_get_cpus(struct device *dev, cpumask_t *mask)
n = of_count_phandle_with_args(dev->of_node, "cpus", NULL);
if (n <= 0)
return -ENODEV;
+
for (; i < n; i++) {
- cpu_node = of_parse_phandle(dev->of_node, "cpus", i);
- if (!cpu_node)
- break;
- cpu = of_cpu_node_to_id(cpu_node);
+ cpu = of_cpu_phandle_to_id(dev->of_node, &cpu_node, i);
of_node_put(cpu_node);
/*
* We have to ignore the failures here and continue scanning
--
2.34.1
Powered by blists - more mailing lists