<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/interconnect/core.c, branch v6.13.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.13.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.13.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-11-04T23:27:39+00:00</updated>
<entry>
<title>interconnect: Use of_property_present() for non-boolean properties</title>
<updated>2024-11-04T23:27:39+00:00</updated>
<author>
<name>Rob Herring (Arm)</name>
<email>robh@kernel.org</email>
</author>
<published>2024-11-04T19:06:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a570feff16bd4fdaa247b4ef13f4d28f8c73903b'/>
<id>urn:sha1:a570feff16bd4fdaa247b4ef13f4d28f8c73903b</id>
<content type='text'>
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Signed-off-by: "Rob Herring (Arm)" &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20241104190650.275278-1-robh@kernel.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: Remove a useless kfree_const() usage</title>
<updated>2024-10-22T08:17:24+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2024-09-26T18:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52cebda10430bc3cfb91ae93be10c5050979f525'/>
<id>urn:sha1:52cebda10430bc3cfb91ae93be10c5050979f525</id>
<content type='text'>
"path-&gt;name" is allocated in of_icc_get_by_index() using kasprintf(), so
there is no point in using kfree_const() to free it.

Switch to the more standard kfree() to free this.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/06630f9ec3e153d0e7773b8d97a17e7c53e0d606.1727375615.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-work-linus</title>
<updated>2024-04-11T12:44:49+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-04-11T12:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=64fe9a8f9fa75cf94e718c082460b2d76d1b7c56'/>
<id>urn:sha1:64fe9a8f9fa75cf94e718c082460b2d76d1b7c56</id>
<content type='text'>
Georgi writes:

interconnect fixes for v6.9-rc

Here are fixes for two reported issues. One of them is a fix for
a driver that tries to access a non-existent resource which prints
a warning message during boot. The other one is fixing a race
condition in the core framework where one struct member has been
left unprotected by mutex.

- interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
- interconnect: Don't access req_list while it's being manipulated

Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;

* tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: Don't access req_list while it's being manipulated
  interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
</content>
</entry>
<entry>
<title>interconnect: Don't access req_list while it's being manipulated</title>
<updated>2024-03-14T11:51:44+00:00</updated>
<author>
<name>Mike Tipton</name>
<email>quic_mdtipton@quicinc.com</email>
</author>
<published>2024-03-05T22:56:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de1bf25b6d771abdb52d43546cf57ad775fb68a1'/>
<id>urn:sha1:de1bf25b6d771abdb52d43546cf57ad775fb68a1</id>
<content type='text'>
The icc_lock mutex was split into separate icc_lock and icc_bw_lock
mutexes in [1] to avoid lockdep splats. However, this didn't adequately
protect access to icc_node::req_list.

The icc_set_bw() function will eventually iterate over req_list while
only holding icc_bw_lock, but req_list can be modified while only
holding icc_lock. This causes races between icc_set_bw(), of_icc_get(),
and icc_put().

Example A:

  CPU0                               CPU1
  ----                               ----
  icc_set_bw(path_a)
    mutex_lock(&amp;icc_bw_lock);
                                     icc_put(path_b)
                                       mutex_lock(&amp;icc_lock);
    aggregate_requests()
      hlist_for_each_entry(r, ...
                                       hlist_del(...
        &lt;r = invalid pointer&gt;

Example B:

  CPU0                               CPU1
  ----                               ----
  icc_set_bw(path_a)
    mutex_lock(&amp;icc_bw_lock);
                                     path_b = of_icc_get()
                                       of_icc_get_by_index()
                                         mutex_lock(&amp;icc_lock);
                                         path_find()
                                           path_init()
    aggregate_requests()
      hlist_for_each_entry(r, ...
                                             hlist_add_head(...
        &lt;r = invalid pointer&gt;

Fix this by ensuring icc_bw_lock is always held before manipulating
icc_node::req_list. The additional places icc_bw_lock is held don't
perform any memory allocations, so we should still be safe from the
original lockdep splats that motivated the separate locks.

[1] commit af42269c3523 ("interconnect: Fix locking for runpm vs reclaim")

Signed-off-by: Mike Tipton &lt;quic_mdtipton@quicinc.com&gt;
Fixes: af42269c3523 ("interconnect: Fix locking for runpm vs reclaim")
Reviewed-by: Rob Clark &lt;robdclark@chromium.org&gt;
Link: https://lore.kernel.org/r/20240305225652.22872-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: constify of_phandle_args in xlate</title>
<updated>2024-02-25T22:38:17+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-02-20T07:22:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0dc5b8abfa03e8720cb341699e3ece194058bb03'/>
<id>urn:sha1:0dc5b8abfa03e8720cb341699e3ece194058bb03</id>
<content type='text'>
The xlate callbacks are supposed to translate of_phandle_args to proper
provider without modifying the of_phandle_args.  Make the argument
pointer to const for code safety and readability.

Acked-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt; # Tegra
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Acked-by: Alim Akhtar &lt;alim.akhtar@samsung.com&gt; # Samsung
Link: https://lore.kernel.org/r/20240220072213.35779-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: Treat xlate() returning NULL node as an error</title>
<updated>2023-11-22T12:36:03+00:00</updated>
<author>
<name>Mike Tipton</name>
<email>quic_mdtipton@quicinc.com</email>
</author>
<published>2023-10-25T14:58:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad2ab1297d0c80899125a842bb7a078abfe1e6ce'/>
<id>urn:sha1:ad2ab1297d0c80899125a842bb7a078abfe1e6ce</id>
<content type='text'>
Currently, if provider-&gt;xlate() or provider-&gt;xlate_extended()
"successfully" return a NULL node, then of_icc_get_from_provider() won't
consider that an error and will successfully return the NULL node. This
bypasses error handling in of_icc_get_by_index() and leads to NULL
dereferences in path_find().

This could be avoided by ensuring provider callbacks always return an
error for NULL nodes, but it's better to explicitly protect against this
in the common framework.

Fixes: 87e3031b6fbd ("interconnect: Allow endpoints translation via DT")
Signed-off-by: Mike Tipton &lt;quic_mdtipton@quicinc.com&gt;
Link: https://lore.kernel.org/r/20231025145829.11603-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'icc-debugfs' into icc-next</title>
<updated>2023-08-22T18:05:09+00:00</updated>
<author>
<name>Georgi Djakov</name>
<email>djakov@kernel.org</email>
</author>
<published>2023-08-22T18:05:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ac3f01201fa1c453fc8a8ce5a7208da9cca254d'/>
<id>urn:sha1:6ac3f01201fa1c453fc8a8ce5a7208da9cca254d</id>
<content type='text'>
This series introduces interconnect debugfs files that support voting
for any interconnect path the framework supports. It is useful for debug,
test and verification.

* icc-debugfs
  debugfs: Add write support to debugfs_create_str()
  interconnect: Reintroduce icc_get()
  interconnect: Add debugfs test client

Link: https://lore.kernel.org/r/20230807142914.12480-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: Add debugfs test client</title>
<updated>2023-08-22T18:04:50+00:00</updated>
<author>
<name>Mike Tipton</name>
<email>quic_mdtipton@quicinc.com</email>
</author>
<published>2023-08-07T14:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=770c69f037c18cfaa37c3d6c6ef8bd257635513f'/>
<id>urn:sha1:770c69f037c18cfaa37c3d6c6ef8bd257635513f</id>
<content type='text'>
It's often useful during test, debug, and development to issue path
votes from shell. Add a debugfs client for this purpose.

Example usage:
	cd /sys/kernel/debug/interconnect/test-client/

	# Configure node endpoints for the path from CPU to DDR on
	# qcom/sm8550.
	echo chm_apps &gt; src_node
	echo ebi &gt; dst_node

	# Get path between src_node and dst_node. This is only
	# necessary after updating the node endpoints.
	echo 1 &gt; get

	# Set desired BW to 1GBps avg and 2GBps peak.
	echo 1000000 &gt; avg_bw
	echo 2000000 &gt; peak_bw

	# Vote for avg_bw and peak_bw on the latest path from "get".
	# Voting for multiple paths is possible by repeating this
	# process for different nodes endpoints.
	echo 1 &gt; commit

Allowing userspace to directly enable and set bus rates can be dangerous
So, following in the footsteps of the regmap [0] and clk [1] frameworks,
keep these userspace controls compile-time disabled without Kconfig
options to enable them. Enabling this will require code changes to
define INTERCONNECT_ALLOW_WRITE_DEBUGFS.

[0] commit 09c6ecd39410 ("regmap: Add support for writing to regmap registers via debugfs")
[1] commit 37215da5553e ("clk: Add support for setting clk_rate via debugfs")

Signed-off-by: Mike Tipton &lt;quic_mdtipton@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230807142914.12480-4-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: Reintroduce icc_get()</title>
<updated>2023-08-22T18:04:37+00:00</updated>
<author>
<name>Mike Tipton</name>
<email>quic_mdtipton@quicinc.com</email>
</author>
<published>2023-08-07T14:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1d13d3b745377f49090882e0482e8786e719a6a4'/>
<id>urn:sha1:1d13d3b745377f49090882e0482e8786e719a6a4</id>
<content type='text'>
The original icc_get() that took integer node IDs was removed due to
lack of users. Reintroduce a new version that takes string node names,
which is needed for the debugfs client.

Signed-off-by: Mike Tipton &lt;quic_mdtipton@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230807142914.12480-3-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: Teach lockdep about icc_bw_lock order</title>
<updated>2023-08-21T22:25:06+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2023-08-07T17:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=13619170303878e1dae86d9a58b039475c957fcf'/>
<id>urn:sha1:13619170303878e1dae86d9a58b039475c957fcf</id>
<content type='text'>
Teach lockdep that icc_bw_lock is needed in code paths that could
deadlock if they trigger reclaim.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Link: https://lore.kernel.org/r/20230807171148.210181-8-robdclark@gmail.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
</feed>
