linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Refactoring finding CPU phandles in DT
@ 2025-07-08 15:14 Alireza Sanaee
  2025-07-08 15:14 ` [PATCH v2 1/5] of: add infra for finding CPU id from phandle Alireza Sanaee
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Alireza Sanaee @ 2025-07-08 15:14 UTC (permalink / raw)
  To: krzk, robh
  Cc: coresight, devicetree, dianders, james.clark, jonathan.cameron,
	linux-arm-kernel, linux-kernel, linux-perf-users, linuxarm,
	mark.rutland, mike.leach, ruanjinjie, saravanak,
	shameerali.kolothum.thodi

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-07-11 16:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 15:14 [PATCH v2 0/5] Refactoring finding CPU phandles in DT Alireza Sanaee
2025-07-08 15:14 ` [PATCH v2 1/5] of: add infra for finding CPU id from phandle Alireza Sanaee
2025-07-11  9:17   ` Jonathan Cameron
2025-07-11  9:35   ` Jonathan Cameron
2025-07-08 15:14 ` [PATCH v2 2/5] arch_topology: update CPU map to use the new API Alireza Sanaee
2025-07-11  9:25   ` Jonathan Cameron
2025-07-08 15:15 ` [PATCH v2 3/5] coresight: cti: Use of_cpu_phandle_to_id for grabbing CPU id Alireza Sanaee
2025-07-11  9:28   ` Jonathan Cameron
2025-07-11 15:55   ` Mike Leach
2025-07-11 16:08     ` Jonathan Cameron
2025-07-08 15:15 ` [PATCH v2 4/5] coresight: " Alireza Sanaee
2025-07-11  9:30   ` Jonathan Cameron
2025-07-08 15:15 ` [PATCH v2 5/5] perf/arm-dsu: refactor cpu id retrieval via new API of_cpu_phandle_to_id Alireza Sanaee
2025-07-11  9:36   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).