[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250708151502.561-1-alireza.sanaee@huawei.com>
Date: Tue, 8 Jul 2025 16:14:57 +0100
From: Alireza Sanaee <alireza.sanaee@...wei.com>
To: <krzk@...nel.org>, <robh@...nel.org>
CC: <coresight@...ts.linaro.org>, <devicetree@...r.kernel.org>,
<dianders@...omium.org>, <james.clark@...aro.org>,
<jonathan.cameron@...wei.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>,
<linuxarm@...wei.com>, <mark.rutland@....com>, <mike.leach@...aro.org>,
<ruanjinjie@...wei.com>, <saravanak@...gle.com>,
<shameerali.kolothum.thodi@...wei.com>
Subject: [PATCH v2 0/5] Refactoring finding CPU phandles in DT
This series refactors the way CPU IDs are retrieved from the device
tree.
Usually, there is a for loop that goes over every single CPU that can be
avoided. This also reduces the amount of NULL pointer checks in drivers.
I have abstracted away that loop and introduced a new function
(of_cpu_node_to_id) for this.
This patchset is a subset of [1], where I removed content and patches
relevant to hyper-threaded cores for DT. Based on the discussion, the
code refactor is still useful, hence this patchset.
Changes since v1 [2]:
- Rebased on top of the latest mainline.
- Addressed Krzysztof Kozlowski's comments -- Hopefully :-)
- Addressed Jonathan Cameron's comments.
[1] https://lore.kernel.org/all/20250512080715.82-1-alireza.sanaee@huawei.com/
[2] https://lore.kernel.org/all/20250707150414.620-1-alireza.sanaee@huawei.com/
Alireza Sanaee (5):
of: add infra for finding CPU id from phandle
arch_topology: update CPU map to use the new API
coresight: cti: Use of_cpu_phandle_to_id for grabbing CPU id
coresight: Use of_cpu_phandle_to_id for grabbing CPU id
perf/arm-dsu: refactor cpu id retrieval via new API
of_cpu_phandle_to_id
drivers/base/arch_topology.c | 16 ++++----
.../coresight/coresight-cti-platform.c | 14 +------
.../hwtracing/coresight/coresight-platform.c | 15 +------
drivers/of/cpu.c | 40 +++++++++++++++++++
drivers/perf/arm_dsu_pmu.c | 8 +---
include/linux/of.h | 9 +++++
6 files changed, 61 insertions(+), 41 deletions(-)
--
2.43.0
Powered by blists - more mailing lists