[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <p3vjrgnxm54xvzvk4evt3v4hpot7stcxx53phopabe6eqa6qhe@rxbffiisaxrf>
Date: Wed, 25 Jun 2025 17:11:11 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Gabor Juhos <j4g8y7@...il.com>
Cc: Georgi Djakov <djakov@...nel.org>,
Raviteja Laggyshetty <quic_rlaggysh@...cinc.com>,
linux-pm@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] interconnect: increase ICC_DYN_ID_START
On Wed, Jun 25, 2025 at 03:34:23PM +0200, Gabor Juhos wrote:
> 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@...00000.clock-controller 0 0
> nss_cc_nssnoc_ppe_clk_slave@...00000.clock-controller 0 0
> nss_cc_nssnoc_ppe_cfg_clk_master@...00000.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 <j4g8y7@...il.com>
> ---
> drivers/interconnect/core.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
--
With best wishes
Dmitry
Powered by blists - more mailing lists