From: Johan Hovold <johan@kernel.org>
To: Gabor Juhos <j4g8y7@gmail.com>
Cc: Georgi Djakov <djakov@kernel.org>,
Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>,
linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] interconnect: increase ICC_DYN_ID_START
Date: Fri, 27 Jun 2025 10:05:10 +0200 [thread overview]
Message-ID: <aF5Qtp-szaN8VADF@hovoldconsulting.com> (raw)
In-Reply-To: <20250625-icc-dyn-id-fix-v1-1-127cb5498449@gmail.com>
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@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 <j4g8y7@gmail.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
prev parent reply other threads:[~2025-06-27 8:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 13:34 [PATCH] interconnect: increase ICC_DYN_ID_START Gabor Juhos
2025-06-25 14:11 ` Dmitry Baryshkov
2025-06-27 8:05 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aF5Qtp-szaN8VADF@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=djakov@kernel.org \
--cc=j4g8y7@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=quic_rlaggysh@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.