summaryrefslogtreecommitdiffstats
path: root/drivers/interconnect (follow)
Commit message (Collapse)AuthorAgeFilesLines
* interconnect: icc-clk: check return values of devm_kasprintf()Bartosz Golaszewski2024-12-171-0/+10
| | | | | | | | | | | devm_kasprintf() can fail and return NULL, add missing return value checks. Fixes: 0ac2a08f42ce ("interconnect: add clk-based icc provider support") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241202165723.17292-1-brgl@bgdev.pl Signed-off-by: Georgi Djakov <djakov@kernel.org>
* interconnect: qcom: icc-rpm: Set the count member before accessing the flex ↵Georgi Djakov2024-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | array The following UBSAN error is reported during boot on the db410c board on a clang-19 build: Internal error: UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP ... pc : qnoc_probe+0x5f8/0x5fc ... The cause of the error is that the counter member was not set before accessing the annotated flexible array member, but after that. Fix this by initializing it earlier. Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Closes: https://lore.kernel.org/r/CA+G9fYs+2mBz1y2dAzxkj9-oiBJ2Acm1Sf1h2YQ3VmBqj_VX2g@mail.gmail.com Fixes: dd4904f3b924 ("interconnect: qcom: Annotate struct icc_onecell_data with __counted_by") Reviewed-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20241203223334.233404-1-djakov@kernel.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* Merge branch 'icc-sar2130p' into icc-nextGeorgi Djakov2024-11-053-0/+1941
|\ | | | | | | | | | | | | | | | | | | | | Add driver for the network of connects present on the SAR2130P platform. * icc-sar2130p dt-bindings: interconnect: qcom: document SAR2130P NoC interconnect: qcom: add support for SAR2130P Link: https://lore.kernel.org/r/20241018-sar2130p-icc-v2-0-c58c73dcd19d@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * interconnect: qcom: add support for SAR2130PDmitry Baryshkov2024-10-223-0/+1941
| | | | | | | | | | | | | | | | | | | | | | | | | | Add driver for the interconnects as present on the Qualcomm SAR2130P platform. This is based on the msm-5.10 tree, tag KERNEL.PLATFORM.1.0.r4-00400-NEO.0. Co-developed-by: Odelu Kukatla <quic_okukatla@quicinc.com> Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241018-sar2130p-icc-v2-2-c58c73dcd19d@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | Merge branch 'icc-qcs615' into icc-nextGeorgi Djakov2024-11-054-0/+1702
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interconnect dt-bindings and driver support for Qualcomm QCS615 SoC. * icc-qcs615 dt-bindings: interconnect: document the RPMh Network-On-Chip interconnect in QCS615 SoC interconnect: qcom: add QCS615 interconnect provider driver Link: https://lore.kernel.org/r/20240924143958.25-1-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: add QCS615 interconnect provider driverRaviteja Laggyshetty2024-10-224-0/+1702
| |/ | | | | | | | | | | | | | | | | | | | | Add driver for the Qualcomm interconnect buses found in QCS615 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Link: https://lore.kernel.org/r/20240924143958.25-3-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | Merge branch 'icc-qcs8300' into icc-nextGeorgi Djakov2024-11-054-0/+2278
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interconnect support for QCS8300 SoC * icc-qcs8300 dt-bindings: interconnect: document the RPMh Network-On-Chip interconnect in QCS8300 SoC interconnect: qcom: add QCS8300 interconnect provider driver Link: https://lore.kernel.org/r/20240910101013.3020-1-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: add QCS8300 interconnect provider driverRaviteja Laggyshetty2024-10-224-0/+2278
| |/ | | | | | | | | | | | | | | | | | | | | Add driver for the Qualcomm interconnect buses found in QCS8300 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Link: https://lore.kernel.org/r/20240910101013.3020-3-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: Use of_property_present() for non-boolean propertiesRob Herring (Arm)2024-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | 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)" <robh@kernel.org> Link: https://lore.kernel.org/r/20241104190650.275278-1-robh@kernel.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: Switch back to struct platform_driver::remove()Uwe Kleine-König2024-10-2241-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/interconnect to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20241017154920.136220-2-u.kleine-koenig@baylibre.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: Remove a useless kfree_const() usageChristophe JAILLET2024-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | "path->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 <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/06630f9ec3e153d0e7773b8d97a17e7c53e0d606.1727375615.git.christophe.jaillet@wanadoo.fr Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: qcom: msm8937: constify pointer to qcom_icc_nodeKrzysztof Kozlowski2024-10-221-4/+4
| | | | | | | | | | | | | | | | Pointers to struct qcom_icc_node are const. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240905151636.280065-1-krzysztof.kozlowski@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: qcom: icc-rpmh: rename qos_clks_required flagRaviteja Laggyshetty2024-10-223-4/+4
| | | | | | | | | | | | | | | | | | | | | | rename qos_clks_required flag to qos_requires_clocks in qcom_icc_desc structure. This flag indicates that clocks are required for accessing and programming the QoS registers. Suggested-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Link: https://lore.kernel.org/r/20240911093516.22347-1-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: qcom: icc-rpmh: probe defer incase of missing QoS clock dependencyRaviteja Laggyshetty2024-10-221-0/+3
|/ | | | | | | | | | | | | | Return -EPROBE_DEFER from interconnect provider incase probe defer is received from devm_clk_bulk_get_all(). This would help in reattempting the inteconnect driver probe, once the required QoS clocks are available. Suggested-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com> Reviewed-by: Konrad Dybcio <konradybcio@kernel.org> Fixes: 0a7be6b35da8 ("interconnect: qcom: icc-rpmh: Add QoS configuration support") Link: https://lore.kernel.org/r/20240911094516.16901-1-quic_rlaggysh@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* Merge branch 'icc-sm8350' into icc-nextGeorgi Djakov2024-08-262-164/+1
|\ | | | | | | | | | | | | | | | | | | | | | | A set of fixes that target stability of the SM8350 platform. * icc-sm8350 interconnect: qcom: sm8350: drop DISP nodes dt-bindings: interconnect: qcom,sm8350: drop DISP nodes interconnect: qcom: sm8250: Enable sync_state Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-0-1149dd8399fe@linaro.org/ Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * interconnect: qcom: sm8250: Enable sync_stateDmitry Baryshkov2024-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | Enable the generic icc sync_state callback to ensure interconnect votes are actually taken into account, instead of being forced to the maximum value. Fixes: b95b668eaaa2 ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-8-1149dd8399fe@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * interconnect: qcom: sm8350: drop DISP nodesDmitry Baryshkov2024-08-232-164/+0
| | | | | | | | | | | | | | | | | | | | | | | | The msm-5.x kernels have additional display RSC and separate display BCM voter. Since upstream kernel doesn't yet provide display RSC, we end up duplicating several nodes, which can result in incorrect votes being cast. Drop *_DISP nodes. Fixes: d26a56674497 ("interconnect: qcom: Add SM8350 interconnect provider driver") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-4-1149dd8399fe@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | Merge branch 'icc-misc' into icc-nextGeorgi Djakov2024-08-266-3/+2938
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This series introduce new ICC drivers for some legacy socs while at it also updates a bit of qcs404 driver which seems to not receive much attention lately. * icc-misc dt-bindings: interconnect: qcom: Add Qualcomm MSM8976 NoC interconnect: qcom: Add MSM8976 interconnect provider driver dt-bindings: interconnect: qcom: Add Qualcomm MSM8937 NoC interconnect: qcom: Add MSM8937 interconnect provider driver interconnect: qcom: qcs404: Mark AP-owned nodes as such interconnect: qcom: qcs404: Add regmaps and more bus descriptions dt-bindings: interconnect: qcom: msm8939: Fix example interconnect: qcom: msm8953: Add ab_coeff dt-bindings: interconnect: qcom: msm8953: Fix 'See also' in description Link: https://lore.kernel.org/all/20240709102728.15349-1-a39.skl@gmail.com/ Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: msm8953: Add ab_coeffAdam Skladowski2024-08-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | BIMC and SNOC-MM on downstream feature qcom,util-fact which translates to ab_coeff, add it. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Link: https://lore.kernel.org/r/20240709102728.15349-9-a39.skl@gmail.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: qcs404: Add regmaps and more bus descriptionsAdam Skladowski2024-08-241-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we are lacking descriptions of regmaps, bus clocks and types of busses, provide them. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Link: https://lore.kernel.org/r/20240709102728.15349-7-a39.skl@gmail.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: qcs404: Mark AP-owned nodes as suchAdam Skladowski2024-08-241-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | When driver was upstreamed it seems ap_owned nodes were not available, bring them now. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Link: https://lore.kernel.org/r/20240709102728.15349-6-a39.skl@gmail.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: Add MSM8937 interconnect provider driverAdam Skladowski2024-08-243-0/+1361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add driver for interconnect busses found in MSM8937 based platforms. The topology consists of four NoCs that are partially controlled by a RPM processor. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Link: https://lore.kernel.org/r/20240709102728.15349-5-a39.skl@gmail.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: Add MSM8976 interconnect provider driverAdam Skladowski2024-08-233-0/+1451
| |/ | | | | | | | | | | | | | | | | | | Add driver for interconnect busses found in MSM8976 based platforms. The topology consists of four NoCs that are partially controlled by a RPM processor. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Link: https://lore.kernel.org/r/20240709102728.15349-3-a39.skl@gmail.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* / interconnect: icc-clk: Add missed num_nodes initializationKees Cook2024-08-231-2/+1
|/ | | | | | | | | | | | | 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: dd4904f3b924 ("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>
* Merge tag 'char-misc-6.11-rc1' of ↵Linus Torvalds2024-07-2021-1/+2456
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc and other driver updates from Greg KH: "Here is the "big" set of char/misc and other driver subsystem changes for 6.11-rc1. Nothing major in here, just loads of new drivers and updates. Included in here are: - IIO api updates and new drivers added - wait_interruptable_timeout() api cleanups for some drivers - MODULE_DESCRIPTION() additions for loads of drivers - parport out-of-bounds fix - interconnect driver updates and additions - mhi driver updates and additions - w1 driver fixes - binder speedups and fixes - eeprom driver updates - coresight driver updates - counter driver update - new misc driver additions - other minor api updates All of these, EXCEPT for the final Kconfig build fix for 32bit systems, have been in linux-next for a while with no reported issues. The Kconfig fixup went in 29 hours ago, so might have missed the latest linux-next, but was acked by everyone involved" * tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (330 commits) misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems misc: delete Makefile.rej binder: fix hang of unregistered readers misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI virtio: add missing MODULE_DESCRIPTION() macro agp: uninorth: add missing MODULE_DESCRIPTION() macro spmi: add missing MODULE_DESCRIPTION() macros dev/parport: fix the array out-of-bounds risk samples: configfs: add missing MODULE_DESCRIPTION() macro misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver misc: keba: Fix missing AUXILIARY_BUS dependency slimbus: Fix struct and documentation alignment in stream.c MAINTAINERS: CC dri-devel list on Qualcomm FastRPC patches misc: fastrpc: use coherent pool for untranslated Compute Banks misc: fastrpc: support complete DMA pool access to the DSP misc: fastrpc: add missing MODULE_DESCRIPTION() macro misc: fastrpc: Add missing dev_err newlines misc: fastrpc: Use memdup_user() nvmem: core: Implement force_ro sysfs attribute nvmem: Use sysfs_emit() for type attribute ...
| * Merge branch 'icc-rpmh-qos' into icc-nextGeorgi Djakov2024-07-043-0/+405
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This series adds QoS support for QNOC type device which can be found on SC7280 platform. It adds support for programming priority, priority forward disable and urgency forwarding. This helps in priortizing the traffic originating from different interconnect masters at NOC (Network On Chip). * icc-rpmh-qos dt-bindings: interconnect: add clock property to enable QOS on SC7280 interconnect: qcom: icc-rpmh: Add QoS configuration support interconnect: qcom: sc7280: enable QoS configuration interconnect: qcom: Fix DT backwards compatibility for QoS Link: https://lore.kernel.org/r/20240607173927.26321-1-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * interconnect: qcom: Fix DT backwards compatibility for QoSOdelu Kukatla2024-07-043-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qos_clks_required flag to skip QoS configuration if clocks property is not populated in devicetree for providers which require clocks to be enabled for accessing registers. This is to keep the QoS configuration backwards compatible with devices that have older DTB. Reported-by: Bjorn Andersson <andersson@kernel.org> Closes: https://lore.kernel.org/all/ciji6nlxn752ina4tmh6kwvek52nxpnguomqek6plwvwgvoqef@yrtexkpmn5br/ Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com> Tested-by: Bjorn Andersson <andersson@kernel.org> Fixes: fbd908bb8bc0 ("interconnect: qcom: sc7280: enable QoS configuration") Link: https://lore.kernel.org/r/20240704125515.22194-1-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * interconnect: qcom: sc7280: enable QoS configurationOdelu Kukatla2024-06-241-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable QoS configuration for master ports with predefined values for priority and urgency forawrding. Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20240607173927.26321-3-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * interconnect: qcom: icc-rpmh: Add QoS configuration supportOdelu Kukatla2024-06-242-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QoS support for QNOC device for configuring priority, priority forward disable and urgency forwarding. QoS is required to prioritize the traffic originating from different interconnect masters at NoC (Network On Chip). Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20240607173927.26321-2-quic_okukatla@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | Merge branch 'icc-msm8953' into icc-nextGeorgi Djakov2024-07-043-0/+1332
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interconnect driver for MSM8953-based devices. * icc-msm8953 dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC interconnect: qcom: Add MSM8953 driver Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-0-a70d582182dc@mainlining.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * | interconnect: qcom: Add MSM8953 driverVladimir Lypak2024-06-283-0/+1332
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add driver for interconnect busses found in MSM8953 based platforms. The topology consists of four NoCs that are partially controlled by a RPM processor. Note that one of NoCs (System NoC) has a counterpart (System NoC MM) that is modelled as child device to avoid resource conflicts, since it uses same MMIO space for configuration. Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-2-a70d582182dc@mainlining.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | Merge branch 'icc-fixes' into icc-nextGeorgi Djakov2024-07-041-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * icc-fixes interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * | interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master IDKonrad Dybcio2024-06-241-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value was wrong, resulting in misprogramming of the hardware. Fix it. Fixes: 1a14b1ac3935 ("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>
| * | Merge branch 'icc-mtk' into icc-nextGeorgi Djakov2024-06-248-0/+711
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MediaTek DVFSRC Bus Bandwidth and Regulator knobs This series adds support for the MediaTek Dynamic Voltage and Frequency Scaling Resource Controller (DVFSRC), found on many MediaTek SoCs. This hardware collects requests from both software and the various remote processors embededd into the SoC, and decides about a minimum operating voltage and a minimum DRAM frequency to fulfill those requests, in an effort to provide the best achievable performance per watt. Such hardware IP is capable of transparently performing direct register R/W on all of the DVFSRC-controlled regulators and SoC bandwidth knobs. Summarizing how the DVFSRC works for Interconnect: ICC provider ICC Nodes ---- ---- _________ |CPU | |--- |VPU | _____ | |----- ---- | ---- | |->| DRAM | ---- | ---- |DRAM |->|scheduler|----- |GPU | |--- |DISP| | |->| (EMI) | ---- | ---- |_____|->|_________|---. ----- | ---- /|\ `-|MMSYS|--|--- |VDEC| | ----- | ---- | | ---- | change DRAM freq |--- |VENC| -------- | ---- SMC --> | DVFSRC | | ---- -------- |--- |IMG | | ---- | ---- |--- |CAM | ---- * icc-mtk dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver interconnect: mediatek: remove unneeded semicolon Link: https://lore.kernel.org/r/20240610085735.147134-1-angelogioacchino.delregno@collabora.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * | interconnect: mediatek: remove unneeded semicolonJiapeng Chong2024-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional modification involved. ./drivers/interconnect/mediatek/icc-emi.c:71:2-3: Unneeded semicolon. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9401 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/20240624025326.69551-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * | interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driverAngeloGioacchino Del Regno2024-06-138-0/+711
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an interconnect driver for the External Memory Interface (EMI), voting for bus bandwidth over the Dynamic Voltage and Frequency Scaling Resource Collector (DVFSRC). ICC provider ICC Nodes ---- ---- --------- |CPU | |--- |VPU | ----- | |----- ---- | ---- |DRAM |--|DRAM | ---- | ---- | |--|scheduler|----- |GPU | |--- |DISP| | |--|(EMI) | ---- | ---- | |--| | ----- | ---- ----- | |----- |MMSYS|--|--- |VDEC| --------- ----- | ---- /|\ | ---- |change DRAM freq |--- |VENC| ---------- | ---- | DVFSR | | | | | ---- ---------- |--- |IMG | | ---- | ---- |--- |CAM | ---- Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240610085735.147134-8-angelogioacchino.delregno@collabora.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: qcom: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-132-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/interconnect_qcom.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/icc-rpmh.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240612-md-drivers-interconnect-qcom-v1-1-da0462d6301b@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| * | interconnect: imx: add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-135-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mm-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mq-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mn-interconnect.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mp-interconnect.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20240603-md-interconnect-imx-v1-1-348a9205506c@quicinc.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | interconnect: icc-clk: Add devm_icc_clk_registerVaradarajan Narayanan2024-07-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | Wrap icc_clk_register to create devm_icc_clk_register to be able to release the resources properly. Acked-by: Georgi Djakov <djakov@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20240430064214.2030013-4-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
* | interconnect: icc-clk: Specify master/slave idsVaradarajan Narayanan2024-07-081-3/+3
|/ | | | | | | | | | | | | | | | | Presently, icc-clk driver autogenerates the master and slave ids. However, devices with multiple nodes on the interconnect could have other constraints and may not match with the auto generated node ids. Hence, modify the driver to use the master/slave ids provided by the caller instead of auto generating. Also, update clk-cbf-8996 accordingly. Acked-by: Georgi Djakov <djakov@kernel.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Link: https://lore.kernel.org/r/20240430064214.2030013-2-quic_varada@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
* tracing/treewide: Remove second parameter of __assign_str()Steven Rostedt (Google)2024-05-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the rework of how the __string() handles dynamic strings where it saves off the source string in field in the helper structure[1], the assignment of that value to the trace event field is stored in the helper value and does not need to be passed in again. This means that with: __string(field, mystring) Which use to be assigned with __assign_str(field, mystring), no longer needs the second parameter and it is unused. With this, __assign_str() will now only get a single parameter. There's over 700 users of __assign_str() and because coccinelle does not handle the TRACE_EVENT() macro I ended up using the following sed script: git grep -l __assign_str | while read a ; do sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file; mv /tmp/test-file $a; done I then searched for __assign_str() that did not end with ';' as those were multi line assignments that the sed script above would fail to catch. Note, the same updates will need to be done for: __assign_str_len() __assign_rel_str() __assign_rel_str_len() I tested this with both an allmodconfig and an allyesconfig (build only for both). [1] https://lore.kernel.org/linux-trace-kernel/20240222211442.634192653@goodmis.org/ Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Julia Lawall <Julia.Lawall@inria.fr> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Christian König <christian.koenig@amd.com> for the amdgpu parts. Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #for Acked-by: Rafael J. Wysocki <rafael@kernel.org> # for thermal Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Darrick J. Wong <djwong@kernel.org> # xfs Tested-by: Guenter Roeck <linux@roeck-us.net>
* Merge tag 'icc-6.10-rc1' of ↵Greg Kroah-Hartman2024-05-042-16/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.10 This pull request contains the interconnect changes for the 6.10-rc1 merge window. It contains some small driver changes listed below: Driver changes: - Cleanup sm6115 QoS port numbering. - Fix incorrect port value in qcm2290 driver. Signed-off-by: Georgi Djakov <djakov@kernel.org> * tag 'icc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numbering
| * interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignmentKonrad Dybcio2024-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | The value was wrong, resulting in misprogramming of the hardware. Fix it. Fixes: 1a14b1ac3935 ("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>
| * interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numberingKonrad Dybcio2024-04-111-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | When I was creating this driver, my bright mind overlooked the existence of desc->qos_offset and decided to make up for the difference it made by adding 21 (0x15) to the port index on SNoC and its downstream buses. Undo this mistake to make the indices actually mean something. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240326-topic-rpm_icc_qos_cleanup-v1-1-357e736792be@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | Merge tag 'icc-6.9-rc2' of ↵Greg Kroah-Hartman2024-04-112-26/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-work-linus 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 <djakov@kernel.org> * 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
| * interconnect: Don't access req_list while it's being manipulatedMike Tipton2024-03-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 af42269c3523 ("interconnect: Fix locking for runpm vs reclaim") Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com> Fixes: af42269c3523 ("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>
| * interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCMKonrad Dybcio2024-03-141-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Booting the kernel on X1E results in a message like: [ 2.561524] qnoc-x1e80100 interconnect-0: ACV_PERF could not find RPMh address And indeed, taking a look at cmd-db, no such BCM exists. Remove it. Fixes: 9f196772841e ("interconnect: qcom: Add X1E80100 interconnect provider driver") Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Mike Tipton <quic_mdtipton@quicinc.com> Link: https://lore.kernel.org/r/20240302-topic-faux_bcm_x1e-v1-1-c40fab7c4bc5@linaro.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
* | Merge tag 'icc-6.9-rc1' of ↵Greg Kroah-Hartman2024-03-0615-1097/+3415
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.9 This pull request contains the interconnect changes for the 6.9-rc1 merge window. The highlights are below: Core changes: - Constify the of_phandle_args in xlate functions. Driver changes: - New interconnect driver for the MSM8909 platform. - New interconnect driver for the SM7150 platform. - Clean-up and removal of unused resources in drivers. - Constify some pointers to structs. Signed-off-by: Georgi Djakov <djakov@kernel.org> * tag 'icc-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: Add SM7150 driver support dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings interconnect: constify of_phandle_args in xlate dt-bindings: interconnect: qcom,rpmh: Fix bouncing @codeaurora address interconnect: qcom: x1e80100: constify pointer to qcom_icc_bcm interconnect: qcom: sa8775p: constify pointer to qcom_icc_bcm interconnect: qcom: sm6115: constify pointer to qcom_icc_node interconnect: qcom: sm8250: constify pointer to qcom_icc_node interconnect: qcom: sa8775p: constify pointer to qcom_icc_node interconnect: qcom: msm8909: constify pointer to qcom_icc_node interconnect: qcom: x1e80100: Remove bogus per-RSC BCMs and nodes dt-bindings: interconnect: Remove bogus interconnect nodes interconnect: qcom: sm8550: Remove bogus per-RSC BCMs and nodes interconnect: qcom: Add MSM8909 interconnect provider driver dt-bindings: interconnect: Add Qualcomm MSM8909 DT bindings
| * Merge branch 'icc-sm7150' into icc-nextGeorgi Djakov2024-02-294-0/+1905
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add dt-bindings and interconnect driver support for the Qualcomm SM7150 SoC. * icc-sm7150 dt-bindings: interconnect: Add Qualcomm SM7150 DT bindings interconnect: qcom: Add SM7150 driver support Link: https://lore.kernel.org/r/20240222174250.80493-1-danila@jiaxyga.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
| | * interconnect: qcom: Add SM7150 driver supportDanila Tikhonov2024-02-294-0/+1905
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver that handles the different NoCs found on SM7150, based on the downstream dtb. Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> Link: https://lore.kernel.org/r/20240222174250.80493-3-danila@jiaxyga.com Signed-off-by: Georgi Djakov <djakov@kernel.org>