<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/interconnect/qcom/osm-l3.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-11-22T13:58:07Z</updated>
<entry>
<title>interconnect: qcom/osm-l3: Convert to platform remove callback returning void</title>
<updated>2023-11-22T13:58:07Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-10-31T22:28:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=237e1edaec6b4ba9c63f23aa2d7b6a4fa146cd0a'/>
<id>urn:sha1:237e1edaec6b4ba9c63f23aa2d7b6a4fa146cd0a</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20231031222851.3126434-18-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: Replace custom implementation of COUNT_ARGS()</title>
<updated>2023-10-10T09:37:34Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-09-20T15:49:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=577a3c5af1fe87b65931ea94d5515266da301f56'/>
<id>urn:sha1:577a3c5af1fe87b65931ea94d5515266da301f56</id>
<content type='text'>
Replace custom and non-portable implementation of COUNT_ARGS().

Fixes: 5bc9900addaf ("interconnect: qcom: Add OSM L3 interconnect provider support")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230920154927.2090732-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: Annotate struct icc_onecell_data with __counted_by</title>
<updated>2023-08-21T22:11:32Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-08-17T20:42:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dd4904f3b924b489a0adbd88768fadaadab94156'/>
<id>urn:sha1:dd4904f3b924b489a0adbd88768fadaadab94156</id>
<content type='text'>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct icc_onecell_data.
Additionally, since the element count member must be set before accessing
the annotated flexible array member, move its initialization earlier.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Andy Gross &lt;agross@kernel.org&gt;
Cc: Bjorn Andersson &lt;andersson@kernel.org&gt;
Cc: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Cc: Georgi Djakov &lt;djakov@kernel.org&gt;
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Acked-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20230817204215.never.916-kees@kernel.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: Explicitly include correct DT includes</title>
<updated>2023-07-16T15:27:27Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:46:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cff66ace51e3acfcba3ab03f92adc9510830c365'/>
<id>urn:sha1:cff66ace51e3acfcba3ab03f92adc9510830c365</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230714174638.4058268-1-robh@kernel.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: drop unuserd header inclusion</title>
<updated>2023-03-20T14:42:27Z</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@linaro.org</email>
</author>
<published>2023-01-03T03:11:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f730038fe6a6de170268fd779b2c029aa70a928b'/>
<id>urn:sha1:f730038fe6a6de170268fd779b2c029aa70a928b</id>
<content type='text'>
The commit 4529992c9474 ("interconnect: qcom: osm-l3: Use
platform-independent node ids") made osm-l3 driver use
platform-independent IDs, removing the need to include platform headers.

Fixes: 4529992c9474 ("interconnect: qcom: osm-l3: Use platform-independent node ids")
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20230103031159.1060075-1-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: fix registration race</title>
<updated>2023-03-07T20:19:05Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2023-03-06T07:56:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=174941ed28a3573db075da46d95b4dcf9d4c49c2'/>
<id>urn:sha1:174941ed28a3573db075da46d95b4dcf9d4c49c2</id>
<content type='text'>
The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail:

	of_icc_xlate_onecell: invalid index 0
	cpu cpu0: error -EINVAL: error finding src node
	cpu cpu0: dev_pm_opp_of_find_icc_paths: Unable to get path0: -22
	qcom-cpufreq-hw: probe of 18591000.cpufreq failed with error -22

Switch to using the new API where the provider is not registered until
after it has been fully initialised.

Fixes: 5bc9900addaf ("interconnect: qcom: Add OSM L3 interconnect provider support")
Cc: stable@vger.kernel.org      # 5.7
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Link: https://lore.kernel.org/r/20230306075651.2449-6-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: fix icc_onecell_data allocation</title>
<updated>2023-03-06T14:48:23Z</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@linaro.org</email>
</author>
<published>2023-01-05T00:22:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f77ebdda0ee652124061c2ac42399bb6c367e729'/>
<id>urn:sha1:f77ebdda0ee652124061c2ac42399bb6c367e729</id>
<content type='text'>
This is a struct with a trailing zero-length array of icc_node pointers
but it's allocated as if it were a single array of icc_nodes instead.

Fortunately this overallocates memory rather then allocating less memory
than required.

Fix by replacing devm_kcalloc() with devm_kzalloc() and struct_size()
macro.

Fixes: 5bc9900addaf ("interconnect: qcom: Add OSM L3 interconnect provider support")
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20230105002221.1416479-2-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: Simplify osm_l3_set()</title>
<updated>2022-11-14T13:05:30Z</updated>
<author>
<name>Bjorn Andersson</name>
<email>quic_bjorande@quicinc.com</email>
</author>
<published>2022-11-11T03:25:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b6bcef163ae0c4329187eea8431a735a60b1d7bb'/>
<id>urn:sha1:b6bcef163ae0c4329187eea8431a735a60b1d7bb</id>
<content type='text'>
The aggregation over votes for all nodes in the provider will always
only find the bandwidth votes for the destination side of the path.
Further more, the average kBps value will always be 0.

Simplify the logic by directly looking at the destination node's peak
bandwidth request.

Signed-off-by: Bjorn Andersson &lt;quic_bjorande@quicinc.com&gt;
Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Reviewed-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Link: https://lore.kernel.org/r/20221111032515.3460-5-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: Add per-core EPSS L3 support</title>
<updated>2022-11-14T13:05:30Z</updated>
<author>
<name>Bjorn Andersson</name>
<email>quic_bjorande@quicinc.com</email>
</author>
<published>2022-11-11T03:25:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9235253ec73dfd71cc83d154693476930fc8dd77'/>
<id>urn:sha1:9235253ec73dfd71cc83d154693476930fc8dd77</id>
<content type='text'>
The EPSS instance in e.g. SM8350 and SC8280XP has per-core L3 voting
enabled. In this configuration, the "shared" vote is done using the
REG_L3_VOTE register instead of PERF_STATE.

Rename epss_l3 to clarify that it's affecting the PERF_STATE register
and add a new L3_VOTE description. Given platform lineage it's assumed
that the L3_VOTE-based case will be the predominant one, so use this for
a new generic qcom,epss-l3 compatible.

While adding the EPSS generic, also add qcom,osm-l3.

Signed-off-by: Bjorn Andersson &lt;quic_bjorande@quicinc.com&gt;
Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Reviewed-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Link: https://lore.kernel.org/r/20221111032515.3460-4-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
<entry>
<title>interconnect: qcom: osm-l3: Squash common descriptors</title>
<updated>2022-11-14T13:05:30Z</updated>
<author>
<name>Bjorn Andersson</name>
<email>quic_bjorande@quicinc.com</email>
</author>
<published>2022-11-11T03:25:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d623264f62d40ca2d2380437f8a6318a2a9e4c66'/>
<id>urn:sha1:d623264f62d40ca2d2380437f8a6318a2a9e4c66</id>
<content type='text'>
Each platform defines their own OSM L3 descriptor, but in practice
there's only two: one for OSM and one for EPSS. Remove the duplicated
definitions.

Signed-off-by: Bjorn Andersson &lt;quic_bjorande@quicinc.com&gt;
Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Reviewed-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Link: https://lore.kernel.org/r/20221111032515.3460-3-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov &lt;djakov@kernel.org&gt;
</content>
</entry>
</feed>
