<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/interconnect, branch v6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-06-27T18:43:40Z</updated>
<entry>
<title>interconnect: avoid memory allocation when 'icc_bw_lock' is held</title>
<updated>2025-06-27T18:43:40Z</updated>
<author>
<name>Gabor Juhos</name>
<email>j4g8y7@gmail.com</email>
</author>
<published>2025-06-27T07:58:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5b60592886f97b01503c1bb553f88d6a7df42ea'/>
<id>urn:sha1:c5b60592886f97b01503c1bb553f88d6a7df42ea</id>
<content type='text'>
The 'icc_bw_lock' mutex is introduced in commit af42269c3523
("interconnect: Fix locking for runpm vs reclaim") in order to decouple
serialization of bw aggregation from codepaths that require memory
allocation.

However commit d30f83d278a9 ("interconnect: core: Add dynamic id
allocation support") added a devm_kasprintf() call into a path protected
by the 'icc_bw_lock' which causes the following lockdep warning on
machines like the Lenovo ThinkPad X13s:

    ======================================================
    WARNING: possible circular locking dependency detected
    6.16.0-rc3 #15 Not tainted
    ------------------------------------------------------
    (udev-worker)/342 is trying to acquire lock:
    ffffb973f7ec4638 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_node_track_caller_noprof+0xa0/0x3e0

    but task is already holding lock:
    ffffb973f7f7f0e8 (icc_bw_lock){+.+.}-{4:4}, at: icc_node_add+0x44/0x154

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (icc_bw_lock){+.+.}-{4:4}:
           icc_init+0x48/0x108
           do_one_initcall+0x64/0x30c
           kernel_init_freeable+0x27c/0x500
           kernel_init+0x20/0x1d8
           ret_from_fork+0x10/0x20

    -&gt; #0 (fs_reclaim){+.+.}-{0:0}:
           __lock_acquire+0x136c/0x2114
           lock_acquire+0x1c8/0x354
           fs_reclaim_acquire+0x74/0xa8
           __kmalloc_node_track_caller_noprof+0xa0/0x3e0
           devm_kmalloc+0x54/0x124
           devm_kvasprintf+0x74/0xd4
           devm_kasprintf+0x58/0x80
           icc_node_add+0xb4/0x154
           qcom_osm_l3_probe+0x20c/0x314 [icc_osm_l3]
           platform_probe+0x68/0xd8
           really_probe+0xc0/0x38c
           __driver_probe_device+0x7c/0x160
           driver_probe_device+0x40/0x110
           __driver_attach+0xfc/0x208
           bus_for_each_dev+0x74/0xd0
           driver_attach+0x24/0x30
           bus_add_driver+0x110/0x234
           driver_register+0x60/0x128
           __platform_driver_register+0x24/0x30
           osm_l3_driver_init+0x20/0x1000 [icc_osm_l3]
           do_one_initcall+0x64/0x30c
           do_init_module+0x58/0x23c
           load_module+0x1df8/0x1f70
           init_module_from_file+0x88/0xc4
           idempotent_init_module+0x188/0x280
           __arm64_sys_finit_module+0x6c/0xd8
           invoke_syscall+0x48/0x110
           el0_svc_common.constprop.0+0xc0/0xe0
           do_el0_svc+0x1c/0x28
           el0_svc+0x4c/0x158
           el0t_64_sync_handler+0xc8/0xcc
           el0t_64_sync+0x198/0x19c

    other info that might help us debug this:

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(icc_bw_lock);
                                   lock(fs_reclaim);
                                   lock(icc_bw_lock);
      lock(fs_reclaim);

     *** DEADLOCK ***

The icc_node_add() functions is not designed to fail, and as such it
should not do any memory allocation. In order to avoid this, add a new
helper function for the name generation to be called by drivers which
are using the new dynamic id feature.

Fixes: d30f83d278a9 ("interconnect: core: Add dynamic id allocation support")
Signed-off-by: Gabor Juhos &lt;j4g8y7@gmail.com&gt;
Link: https://lore.kernel.org/r/20250625-icc-bw-lockdep-v3-1-2b8f8b8987c4@gmail.com
Co-developed-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Link: https://lore.kernel.org/r/20250627075854.26943-1-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: icc-clk: destroy nodes in case of memory allocation failures</title>
<updated>2025-06-26T16:18:01Z</updated>
<author>
<name>Gabor Juhos</name>
<email>j4g8y7@gmail.com</email>
</author>
<published>2025-06-25T17:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=618c810a7b2163517ab1875bd56b633ca3cb3328'/>
<id>urn:sha1:618c810a7b2163517ab1875bd56b633ca3cb3328</id>
<content type='text'>
When memory allocation fails during creating the name of the nodes in
icc_clk_register(), the code continues on the error path and it calls
icc_nodes_remove() to destroy the already created nodes. However that
function only destroys the nodes which were already added to the provider
and the newly created nodes are never destroyed in case of error.

In order to avoid a memory leaks, change the code to destroy the newly
created nodes explicitly in case of memory allocation failures.

Fixes: 44c5aa73ccd1 ("interconnect: icc-clk: check return values of devm_kasprintf()")
Signed-off-by: Gabor Juhos &lt;j4g8y7@gmail.com&gt;
Reviewed-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Link: https://lore.kernel.org/r/20250625-icc-clk-memleak-fix-v1-1-4151484cd24f@gmail.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: increase ICC_DYN_ID_START</title>
<updated>2025-06-26T16:17:19Z</updated>
<author>
<name>Gabor Juhos</name>
<email>j4g8y7@gmail.com</email>
</author>
<published>2025-06-25T13:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1809db75bd1fa71e27e199e4c5cc9072741f6052'/>
<id>urn:sha1:1809db75bd1fa71e27e199e4c5cc9072741f6052</id>
<content type='text'>
Since commit d30f83d278a9 ("interconnect: core: Add dynamic id allocation
support"), interconnect node ids greater than or equal to ICC_DYN_ID_START
are reserved for dynamic id allocation. Yet the icc_node_create_nolock()
function allows to directly use such ids for creating nodes. This can
cause problems by executing dynamic id related codepaths even for nodes
intended to use static ids.

For example, the 'nsscc-ipq9574' driver creates interconnect nodes with
static ids starting from 19148. Because these ids belongs to the dynamic
id range, the icc_node_add() function replaces the node names
unexpectedly.

The node names looked like this before the change:

  # grep nss_cc /sys/kernel/debug/interconnect/interconnect_summary
  nss_cc_nssnoc_ppe_clk_master                          0            0
  nss_cc_nssnoc_ppe_clk_slave                           0            0
  nss_cc_nssnoc_ppe_cfg_clk_master                      0            0
  ...

And those have an unexpected suffix now:

  # grep nss_cc /sys/kernel/debug/interconnect/interconnect_summary
  nss_cc_nssnoc_ppe_clk_master@39b00000.clock-controller            0            0
  nss_cc_nssnoc_ppe_clk_slave@39b00000.clock-controller            0            0
  nss_cc_nssnoc_ppe_cfg_clk_master@39b00000.clock-controller            0            0
  ...

Increase the value of ICC_DYN_ID_START to avoid this.

Also, add sanity check to the icc_node_create_nolock() function to prevent
directly creating nodes with ids reserved for dynamic allocation in order
to detect these kind of problems.

Fixes: d30f83d278a9 ("interconnect: core: Add dynamic id allocation support")
Signed-off-by: Gabor Juhos &lt;j4g8y7@gmail.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250625-icc-dyn-id-fix-v1-1-127cb5498449@gmail.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: exynos: handle node name allocation failure</title>
<updated>2025-06-23T14:59:09Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2025-06-23T14:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b44f12ae21f661e5d97fb4a8b234d6689f68f706'/>
<id>urn:sha1:b44f12ae21f661e5d97fb4a8b234d6689f68f706</id>
<content type='text'>
Add the missing error handling in case node name allocation ever fails.

Fixes: 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs")
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Link: https://lore.kernel.org/r/20250623142437.23068-1-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node</title>
<updated>2025-06-23T14:56:01Z</updated>
<author>
<name>Xilin Wu</name>
<email>sophon@radxa.com</email>
</author>
<published>2025-06-13T14:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=886a94f008dd1a1702ee66dd035c266f70fd9e90'/>
<id>urn:sha1:886a94f008dd1a1702ee66dd035c266f70fd9e90</id>
<content type='text'>
This allows adding interconnect paths for PCIe 1 in device tree later.

Fixes: 46bdcac533cc ("interconnect: qcom: Add SC7280 interconnect provider driver")
Signed-off-by: Xilin Wu &lt;sophon@radxa.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250613-sc7280-icc-pcie1-fix-v1-1-0b09813e3b09@radxa.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'icc-sa8775p' into icc-next</title>
<updated>2025-05-19T14:09:50Z</updated>
<author>
<name>Georgi Djakov</name>
<email>djakov@kernel.org</email>
</author>
<published>2025-05-19T14:09:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5fed7fe33c2cd7104fc87b7bc699a7be892befa2'/>
<id>urn:sha1:5fed7fe33c2cd7104fc87b7bc699a7be892befa2</id>
<content type='text'>
Add Epoch Subsystem (EPSS) L3 provider support on SA8775P SoCs.

Current interconnect framework is based on static IDs for creating node
and registering with framework. This becomes a limitation for topologies
where there are multiple instances of same interconnect provider.
Modified interconnect framework APIs to create and link icc node with
dynamic IDs, this will help to overcome the dependency on static IDs.

* icc-sa8775p
  dt-bindings: interconnect: Add EPSS L3 compatible for SA8775P
  interconnect: core: Add dynamic id allocation support
  interconnect: qcom: Add multidev EPSS L3 support
  interconnect: qcom: icc-rpmh: Add dynamic icc node id support
  interconnect: qcom: sa8775p: Add dynamic icc node id support

Link: https://lore.kernel.org/r/20250415095343.32125-1-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: sm8650: remove regmap config for mc_virt &amp; clk_virt</title>
<updated>2025-05-19T14:09:32Z</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2025-05-19T13:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0779ea486061a1756892f4ea43e258e5dd559cd'/>
<id>urn:sha1:b0779ea486061a1756892f4ea43e258e5dd559cd</id>
<content type='text'>
The mc_virt &amp; clk_virt nodes are virtual and doesn't have associated registers,
thus the regmap config will fail with:
qnoc-sm8650 interconnect-0: error -EINVAL: invalid resource (null)

Remove the regmap config since QoS will never be applied to those virtual
nodes.

Reported-by: Pengyu Luo &lt;mitltlatltl@gmail.com&gt;
Fixes: 40ef9b6b778f ("interconnect: qcom: sm8650: enable QoS configuration")
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20250519-topic-sm8650-upstream-icc-qos-fix-v1-1-6ace779250aa@linaro.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: sm8650: add the MASTER_APSS_NOC</title>
<updated>2025-04-28T14:50:21Z</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2025-04-15T14:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=463f2eaa203aa04373cce87d9475fb9cdb09c8d9'/>
<id>urn:sha1:463f2eaa203aa04373cce87d9475fb9cdb09c8d9</id>
<content type='text'>
Add the MASTER_APSS_NOC interconnect node of the system NoC
and the associated QoS configuration.

Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250415-topic-sm8650-upstream-icc-apss-noc-v1-2-9e6bea3943d8@linaro.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: sm8650: enable QoS configuration</title>
<updated>2025-04-28T14:49:04Z</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2025-04-07T15:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40ef9b6b778fee32b33ff52b5e9c07113b6c6435'/>
<id>urn:sha1:40ef9b6b778fee32b33ff52b5e9c07113b6c6435</id>
<content type='text'>
Enable QoS configuration for master ports with predefined values
for priority and urgency forwarding.

Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20250407-topic-sm8650-upstream-icc-qos-v1-1-93b33f99a455@linaro.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: sa8775p: Add dynamic icc node id support</title>
<updated>2025-04-15T11:13:54Z</updated>
<author>
<name>Raviteja Laggyshetty</name>
<email>quic_rlaggysh@quicinc.com</email>
</author>
<published>2025-04-15T09:53:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1244645ad6c79d89974c015abe552d47a42dbdc'/>
<id>urn:sha1:b1244645ad6c79d89974c015abe552d47a42dbdc</id>
<content type='text'>
To facilitate dynamic id allocation, discard the static IDs
from node data and set alloc_dyn_id in descriptor structure
to indicate dynamic ID allocation. Update the topology to use
node pointers for links instead of static IDs and forward declare
the node pointer to avoid undefined references.

Signed-off-by: Raviteja Laggyshetty &lt;quic_rlaggysh@quicinc.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250415095343.32125-6-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
</feed>
