linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Refactoring finding CPU phandles in DT
@ 2025-07-07 15:04 Alireza Sanaee
  2025-07-07 15:04 ` [PATCH 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-07 15:04 UTC (permalink / raw)
  To: mark.rutland, robh
  Cc: coresight, devicetree, dianders, james.clark, jonathan.cameron,
	krzk, linux-arm-kernel, linux-kernel, linux-perf-users, linuxarm,
	mike.leach, ruanjinjie, saravanak, shameerali.kolothum.thodi,
	suzuki.poulose

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.

[1] https://lore.kernel.org/all/20250512080715.82-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                  | 12 ++++----
 .../coresight/coresight-cti-platform.c        | 15 ++--------
 .../hwtracing/coresight/coresight-platform.c  | 14 ++-------
 drivers/of/cpu.c                              | 29 +++++++++++++++++++
 drivers/perf/arm_dsu_pmu.c                    |  6 ++--
 include/linux/of.h                            |  9 ++++++
 6 files changed, 51 insertions(+), 34 deletions(-)

-- 
2.43.0



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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 15:04 [PATCH 0/5] Refactoring finding CPU phandles in DT Alireza Sanaee
2025-07-07 15:04 ` [PATCH 1/5] of: add infra for finding CPU id from phandle Alireza Sanaee
2025-07-08  8:26   ` Jonathan Cameron
2025-07-07 15:04 ` [PATCH 2/5] arch_topology: update CPU map to use the new API Alireza Sanaee
2025-07-08  6:29   ` Krzysztof Kozlowski
2025-07-08  8:22     ` Jonathan Cameron
2025-07-08  8:26       ` Krzysztof Kozlowski
2025-07-08  8:31   ` Jonathan Cameron
2025-07-07 15:04 ` [PATCH 3/5] coresight: cti: Use of_cpu_phandle_to_id for grabbing CPU id Alireza Sanaee
2025-07-08  8:36   ` Jonathan Cameron
2025-07-07 15:04 ` [PATCH 4/5] coresight: " Alireza Sanaee
2025-07-08  8:37   ` Jonathan Cameron
2025-07-07 15:04 ` [PATCH 5/5] perf/arm-dsu: refactor cpu id retrieval via new API of_cpu_phandle_to_id Alireza Sanaee
2025-07-08  8:38   ` 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).