Dmitry Baryshkov and Greg Kroah-Hartman
cc03984d70
interconnect: qcom: sc8180x: specify num_nodes
...
[ Upstream commit 7e0b59496a ]
Specify .num_nodes for several BCMs which missed this declaration.
Fixes: 04548d4e27 ("interconnect: qcom: sc8180x: Reformat node and bcm definitions")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Link: https://lore.kernel.org/r/20250704-rework-icc-v2-2-875fac996ef5@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-08-15 12:08:44 +02:00
Dmitry Baryshkov and Greg Kroah-Hartman
37dfd6d6c9
interconnect: qcom: sc8280xp: specify num_links for qnm_a1noc_cfg
...
[ Upstream commit 02ee375506 ]
The qnm_a1noc_cfg declaration didn't include .num_links definition, fix
it.
Fixes: f29dabda79 ("interconnect: qcom: Add SC8280XP interconnect provider")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Link: https://lore.kernel.org/r/20250704-rework-icc-v2-1-875fac996ef5@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-08-15 12:08:44 +02:00
Xilin Wu and Greg Kroah-Hartman
6a85c96e61
interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node
...
[ Upstream commit 886a94f008 ]
This allows adding interconnect paths for PCIe 1 in device tree later.
Fixes: 46bdcac533 ("interconnect: qcom: Add SC7280 interconnect provider driver")
Signed-off-by: Xilin Wu <sophon@radxa.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Link: https://lore.kernel.org/r/20250613-sc7280-icc-pcie1-fix-v1-1-0b09813e3b09@radxa.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-08-01 09:47:28 +01:00
Kees Cook and Greg Kroah-Hartman
c16fa6d501
interconnect: icc-clk: Add missed num_nodes initialization
...
[ Upstream commit c801ed8684 ]
With the new __counted_by annotation, the "num_nodes" struct member must
be set before accessing the "nodes" array. This initialization was done
in other places where a new struct icc_onecell_data is allocated, but this
case in icc_clk_register() was missed. Set "num_nodes" after allocation.
Fixes: dd4904f3b9 ("interconnect: qcom: Annotate struct icc_onecell_data with __counted_by")
Signed-off-by: Kees Cook <kees@kernel.org >
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Link: https://lore.kernel.org/r/20240716214819.work.328-kees@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-10-04 16:29:40 +02:00
Konrad Dybcio and Greg Kroah-Hartman
48eecce940
interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID
...
[ Upstream commit cd5ce45890 ]
The value was wrong, resulting in misprogramming of the hardware.
Fix it.
Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Reported-by: Stephan Gerhold <stephan@gerhold.net >
Closes: https://lore.kernel.org/linux-arm-msm/ZgMs_xZVzWH5uK-v@gerhold.net/
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20240618-topic-2290_icc_2-v1-1-64446888a133@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-08-03 08:53:58 +02:00
Konrad Dybcio and Greg Kroah-Hartman
e21a398d22
interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
...
[ Upstream commit 230d05b117 ]
The value was wrong, resulting in misprogramming of the hardware.
Fix it.
Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20240326-topic-rpm_icc_qos_cleanup-v1-2-357e736792be@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-06-12 11:12:18 +02:00
Mike Tipton and Greg Kroah-Hartman
d0d04efa2e
interconnect: Don't access req_list while it's being manipulated
...
[ Upstream commit de1bf25b6d ]
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(&icc_bw_lock);
icc_put(path_b)
mutex_lock(&icc_lock);
aggregate_requests()
hlist_for_each_entry(r, ...
hlist_del(...
<r = invalid pointer>
Example B:
CPU0 CPU1
---- ----
icc_set_bw(path_a)
mutex_lock(&icc_bw_lock);
path_b = of_icc_get()
of_icc_get_by_index()
mutex_lock(&icc_lock);
path_find()
path_init()
aggregate_requests()
hlist_for_each_entry(r, ...
hlist_add_head(...
<r = invalid pointer>
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 af42269c35 ("interconnect: Fix locking for runpm vs reclaim")
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com >
Fixes: af42269c35 ("interconnect: Fix locking for runpm vs reclaim")
Reviewed-by: Rob Clark <robdclark@chromium.org >
Link: https://lore.kernel.org/r/20240305225652.22872-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-04-27 17:11:37 +02:00
Konrad Dybcio and Greg Kroah-Hartman
008cf5d1da
interconnect: qcom: sm8550: Enable sync_state
...
[ Upstream commit 24406f6794 ]
To ensure the interconnect votes are actually meaningful and in order to
prevent holding all buses at FMAX, introduce the sync state callback.
Fixes: e6f0d6a30f ("interconnect: qcom: Add SM8550 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-2-ce1272d77540@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-02-23 09:24:57 +01:00
Konrad Dybcio and Greg Kroah-Hartman
d8e36ff40c
interconnect: qcom: sc8180x: Mark CO0 BCM keepalive
...
[ Upstream commit 85e985a4f4 ]
The CO0 BCM needs to be up at all times, otherwise some hardware (like
the UFS controller) loses its connection to the rest of the SoC,
resulting in a hang of the platform, accompanied by a spectacular
logspam.
Mark it as keepalive to prevent such cases.
Fixes: 9c8c6bac1a ("interconnect: qcom: Add SC8180x providers")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-1-421904863006@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-02-23 09:24:57 +01:00
Konrad Dybcio and Greg Kroah-Hartman
5832822a4a
interconnect: qcom: sm8250: Enable sync_state
...
[ Upstream commit bfc7db1cb9 ]
Add the generic icc sync_state callback to ensure interconnect votes
are taken into account, instead of being pegged at maximum values.
Fixes: b95b668eaa ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20231130-topic-8250icc_syncstate-v1-1-7ce78ba6e04c@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-01 12:42:36 +00:00
Mike Tipton and Greg Kroah-Hartman
1d42af06c6
interconnect: Treat xlate() returning NULL node as an error
...
[ Upstream commit ad2ab1297d ]
Currently, if provider->xlate() or provider->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: 87e3031b6f ("interconnect: Allow endpoints translation via DT")
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com >
Link: https://lore.kernel.org/r/20231025145829.11603-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-01-01 12:42:36 +00:00
Yang Yingliang and Greg Kroah-Hartman
0967f1d9f1
interconnect: fix error handling in qnoc_probe()
...
[ Upstream commit 273f74a2e7 ]
Add missing clk_disable_unprepare() and clk_bulk_disable_unprepare()
in the error path in qnoc_probe(). And when qcom_icc_qos_set() fails,
it needs remove nodes and disable clks.
Fixes: 2e2113c8a6 ("interconnect: qcom: rpm: Handle interface clocks")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com >
Link: https://lore.kernel.org/r/20230803130521.959487-1-yangyingliang@huawei.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Andy Shevchenko and Greg Kroah-Hartman
c39ab57032
interconnect: qcom: osm-l3: Replace custom implementation of COUNT_ARGS()
...
[ Upstream commit 577a3c5af1 ]
Replace custom and non-portable implementation of COUNT_ARGS().
Fixes: 5bc9900add ("interconnect: qcom: Add OSM L3 interconnect provider support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230920154927.2090732-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
620cebaf87
interconnect: qcom: sm8350: Set ACV enable_mask
...
[ Upstream commit df1b8356a8 ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: d26a566744 ("interconnect: qcom: Add SM8350 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-11-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
c2857e1757
interconnect: qcom: sm8250: Set ACV enable_mask
...
[ Upstream commit 9434c68961 ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 6df5b34949 ("interconnect: qcom: Add SM8250 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-10-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
c164f5cad6
interconnect: qcom: sm8150: Set ACV enable_mask
...
[ Upstream commit 7ed4217640 ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: a09b817c8b ("interconnect: qcom: Add SM8150 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-9-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
aa6f3ce1d9
interconnect: qcom: sm6350: Set ACV enable_mask
...
[ Upstream commit fe7a3abf41 ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 6a6eff73a9 ("interconnect: qcom: Add SM6350 driver support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-8-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
a6fe66653f
interconnect: qcom: sdm845: Set ACV enable_mask
...
[ Upstream commit f8fe97a9fd ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: b5d2f74107 ("interconnect: qcom: Add sdm845 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-7-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
435b718301
interconnect: qcom: sdm670: Set ACV enable_mask
...
[ Upstream commit 7b85ea8b93 ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 7e438e1887 ("interconnect: qcom: add sdm670 interconnects")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-6-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
263bde32bf
interconnect: qcom: sc8280xp: Set ACV enable_mask
...
[ Upstream commit 688ffb3dcf ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: f29dabda79 ("interconnect: qcom: Add SC8280XP interconnect provider")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-5-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
ddab041e39
interconnect: qcom: sc8180x: Set ACV enable_mask
...
[ Upstream commit 0fcaaed3ff ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 9c8c6bac1a ("interconnect: qcom: Add SC8180x providers")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-4-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
40d019b823
interconnect: qcom: sc7280: Set ACV enable_mask
...
[ Upstream commit 437b8e7fcd ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 46bdcac533 ("interconnect: qcom: Add SC7280 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-3-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:27 +01:00
Konrad Dybcio and Greg Kroah-Hartman
5eb5d9c43c
interconnect: qcom: sc7180: Set ACV enable_mask
...
[ Upstream commit 1ad83c4792 ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 2d1f95ab9f ("interconnect: qcom: Add SC7180 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-2-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:26 +01:00
Konrad Dybcio and Greg Kroah-Hartman
41936ddd14
interconnect: qcom: qdu1000: Set ACV enable_mask
...
[ Upstream commit 8517824f0e ]
ACV expects an enable_mask corresponding to the APPS RSC, fill it in.
Fixes: 1f51339f7d ("interconnect: qcom: Add QDU1000/QRU1000 interconnect driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-acv-v2-1-765ad70e539a@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-11-20 11:59:26 +01:00
Georgi Djakov
6ac3f01201
Merge branch 'icc-debugfs' into icc-next
...
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 <djakov@kernel.org >
2023-08-22 21:05:09 +03:00
Mike Tipton and Georgi Djakov
770c69f037
interconnect: Add debugfs test client
...
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 > src_node
echo ebi > dst_node
# Get path between src_node and dst_node. This is only
# necessary after updating the node endpoints.
echo 1 > get
# Set desired BW to 1GBps avg and 2GBps peak.
echo 1000000 > avg_bw
echo 2000000 > 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 > 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 09c6ecd394 ("regmap: Add support for writing to regmap registers via debugfs")
[1] commit 37215da555 ("clk: Add support for setting clk_rate via debugfs")
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com >
Link: https://lore.kernel.org/r/20230807142914.12480-4-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 21:04:50 +03:00
Mike Tipton and Georgi Djakov
1d13d3b745
interconnect: Reintroduce icc_get()
...
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 <quic_mdtipton@quicinc.com >
Link: https://lore.kernel.org/r/20230807142914.12480-3-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 21:04:37 +03:00
Konrad Dybcio and Georgi Djakov
a18e26a58b
interconnect: qcom: icc-rpmh: Retire DEFINE_QBCM
...
This helper has no users anymore. Kill it with heavy fire.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-20-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:33 +03:00
Konrad Dybcio and Georgi Djakov
edd13c04ff
interconnect: qcom: sm8350: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-19-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:30 +03:00
Konrad Dybcio and Georgi Djakov
8e509d66df
interconnect: qcom: sm8250: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-18-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:28 +03:00
Konrad Dybcio and Georgi Djakov
670699a422
interconnect: qcom: sm8150: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-17-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:25 +03:00
Konrad Dybcio and Georgi Djakov
ab2c1cb574
interconnect: qcom: sm6350: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-16-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:23 +03:00
Konrad Dybcio and Georgi Djakov
de2ae887d3
interconnect: qcom: sdx65: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-15-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:20 +03:00
Konrad Dybcio and Georgi Djakov
37474b02d2
interconnect: qcom: sdx55: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-14-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:16 +03:00
Konrad Dybcio and Georgi Djakov
35f490c5e4
interconnect: qcom: sdm845: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-13-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:14 +03:00
Konrad Dybcio and Georgi Djakov
46cd2018c5
interconnect: qcom: sdm670: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-12-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:11 +03:00
Konrad Dybcio and Georgi Djakov
e451b2ea5a
interconnect: qcom: sc7180: Retire DEFINE_QBCM
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-11-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:08 +03:00
Konrad Dybcio and Georgi Djakov
b32968a84c
interconnect: qcom: icc-rpmh: Retire DEFINE_QNODE
...
This helper has no users anymore. Kill it with heavy fire.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-10-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:06 +03:00
Konrad Dybcio and Georgi Djakov
9e62ccde36
interconnect: qcom: sm8350: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-9-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:03 +03:00
Konrad Dybcio and Georgi Djakov
aaf7d02ff8
interconnect: qcom: sm8250: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-8-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:07:01 +03:00
Konrad Dybcio and Georgi Djakov
9533964b7b
interconnect: qcom: sm8150: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-7-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:06:57 +03:00
Konrad Dybcio and Georgi Djakov
5affec83c4
interconnect: qcom: sm6350: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-6-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:06:53 +03:00
Konrad Dybcio and Georgi Djakov
a5403ec675
interconnect: qcom: sdx65: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-5-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:06:50 +03:00
Konrad Dybcio and Georgi Djakov
55ac6a6867
interconnect: qcom: sdx55: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-4-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:06:48 +03:00
Konrad Dybcio and Georgi Djakov
664e80879d
interconnect: qcom: sdm845: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-3-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:06:44 +03:00
Konrad Dybcio and Georgi Djakov
99cb3e8098
interconnect: qcom: sdm670: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-2-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:06:41 +03:00
Konrad Dybcio and Georgi Djakov
ea168170cd
interconnect: qcom: sc7180: Retire DEFINE_QNODE
...
The struct definition macros are hard to read and compare, expand them.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230811-topic-icc_retire_macrosd-v1-1-c03aaeffc769@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 15:04:38 +03:00
Georgi Djakov
e0d855b576
Merge branch 'icc-enable-mask' into icc-next
...
As pointed out by Bjorn and Mike in [1], we can simplify the handling
of enable_mask-based BCMs. This series attempts to do so and fixes a bug
that snuck in.
Gave a quick spin on 8450, doesn't seem to have exploded.
[1] https://lore.kernel.org/linux-arm-msm/113b50f8-35f6-73fc-4fc9-302262927c5e@quicinc.com/
Link: https://lore.kernel.org/r/20230811-topic-icc_fix_1he-v2-0-0620af8ac133@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 01:49:38 +03:00
Konrad Dybcio and Georgi Djakov
1a70ca7154
interconnect: qcom: bcm-voter: Use enable_maks for keepalive voting
...
BCMs with an enable_mask expect to only have that specific value written
to them. The current implementation only works by miracle for BCMs with
enable mask == BIT(0), as the minimal vote we've been using so far just
so happens to be equal to that.
Use the correct value with keepalive voting.
Fixes: d8630f050d ("interconnect: qcom: Add support for mask-based BCMs")
Reported-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-icc_fix_1he-v2-2-0620af8ac133@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 01:43:56 +03:00
Konrad Dybcio and Georgi Djakov
a1f4170dec
interconnect: qcom: bcm-voter: Improve enable_mask handling
...
We don't need all the complex arithmetic for BCMs utilizing enable_mask,
as all we need to do is to determine whether there's any user (or
keepalive) asking for it to be on.
Separate the logic for such BCMs for a small speed boost.
Suggested-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Link: https://lore.kernel.org/r/20230811-topic-icc_fix_1he-v2-1-0620af8ac133@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org >
2023-08-22 01:39:24 +03:00