Commit Graph

631 Commits

Author SHA1 Message Date
Linus Torvalds
330517c63a Char/Misc/IIO/others driver changes for 7.4-rc1
Here is the big set of char/misc/android/iio and other small driver
 subsystem patches for 7.4-rc1.  Loads of stuff in here, larger than
 normal.  Highlights include:
   - removal of the C binder code, the rust version is stable and will be
     used going forward in a few billion devices.  Great job by those
     developers.
   - loads and loads of IIO driver updates and feature additions
   - speakup driver fixes and updates
   - mhi driver updates
   - mei driver updates
   - xillybus driver fixes
   - comedi driver fixes
   - lots of coresight driver updates
   - Interconnect driver updates
   - nvmem driver updates and fixes
   - slimbus driver updates and fixes
   - spmi driver updates and fixes
   - lots of tiny misc and char driver fixes based on people scanning for
     things.
 
 All of these have been in linux-next for a while with no reported
 issues, other than a merge conflict with one of the rust tree files,
 which should be simple to resolve.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCatoRcw8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykFeACgnRxMgD7VH8duyUtfTnaU+Mw8REMAni1iFmLx
 IOZYy7rCdaO/rBSm4TEK
 =OOpW
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull Char/Misc/IIO/others driver updates from Greg KH:
 "Here is the big set of char/misc/android/iio and other small driver
  subsystem patches for 7.4-rc1. Loads of stuff in here, larger than
  normal. Highlights include:

   - removal of the C binder code, the rust version is stable and will
     be used going forward in a few billion devices. Great job by those
     developers

   - loads and loads of IIO driver updates and feature additions

   - speakup driver fixes and updates

   - mhi driver updates

   - mei driver updates

   - xillybus driver fixes

   - comedi driver fixes

   - lots of coresight driver updates

   - Interconnect driver updates

   - nvmem driver updates and fixes

   - slimbus driver updates and fixes

   - spmi driver updates and fixes

   - lots of tiny misc and char driver fixes based on people scanning
     for things

  All of these have been in linux-next for a while with no reported
  issues, other than a merge conflict with one of the rust tree files,
  which should be simple to resolve"

* tag 'char-misc-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (446 commits)
  rust_binder: wake epoll on self-work queued to poll thread
  rust_binder: avoid overflow in get_node_debug_info()
  MAINTAINERS: Add Abel as SPMI co-maintainer
  spmi: mtk-pmif: Fix clock reference leak in mtk_spmi_bus_probe()
  iio: adc: qcom-spmi-iadc: Remove regmap R/W wrapper functions
  iio: adc: qcom-spmi-iadc: Migrate to devm_spmi_subdevice_alloc_and_add()
  misc: qcom-coincell: Migrate to devm_spmi_subdevice_alloc_and_add()
  phy: qualcomm: eusb2-repeater: Migrate to devm_spmi_subdevice_alloc_and_add()
  power: reset: qcom-pon: Migrate to devm_spmi_subdevice_alloc_and_add()
  nvmem: qcom-spmi-sdam: Migrate to devm_spmi_subdevice_alloc_and_add()
  spmi: Add helper to get a parent SPMI device
  spmi: Implement spmi_subdevice_alloc_and_add() and devm variant
  spmi: Remove unneeded goto in spmi_device_add() error path
  spmi: Print error status with %pe format
  spmi: Remove redundant dev_name() print in spmi_device_add()
  spmi: Fix potential use-after-free by grabbing of_node reference
  spmi: mtk-pmif: Add workaround for FSM lockup/error in read operation
  MAINTAINERS: Add Qualcomm SPMI controller entry
  spmi: pmic-arb: return 0 in spmi_pmic_arb_register_buses() on success
  comedi: addi_apci_3xxx: fix subdevice count underallocation
  ...
2026-10-24 15:44:26 -10:00
Linus Torvalds
7be4bc52fd Driver core changes for 7.4-rc1
- core:
 
   - Add TAINT_FORCED_BIND to taint the kernel and driver module before manual
     sysfs bind/unbind operations; make add_taint_module() available to
     driver core and update taint decoding tools and documentation
 
   - Constify device_show/store_*() attribute parameters and adapt x86 MCE and
     perf users to prepare for const dev_ext_attribute instances
 
   - Fix UAF in NUMA access node registration failure handling by dropping
     the device reference with put_device() instead of directly freeing the node
 
 - debugfs:
 
   - Make debugfs_create_str() read-only to eliminate double-free races between
     concurrent writers; reject writable modes; convert interconnect and
     SoundWire users to local file operations with mutex-protected strings
 
 - kobject:
 
   - Fix out-of-bounds access in kobject_action_type() when parsing action
     strings containing embedded NUL bytes
 
   - Fix the kobject_set_name() reference in kset_register() kernel-doc
 
 - Rust:
 
   - DMA:
 
     - Tie Coherent, CoherentBox and CoherentHandle to the device's bound
       lifetime to prevent retaining DMA allocations beyond driver unbind;
       propagate the lifetime through nova-core and the DMA sample driver
 
   - I/O:
 
     - Require explicit base types for registers and replace relative registers
       with typed subregion projections; reimplement register!() as a proc
       macro, support registers using existing types without inline bitfields,
       and convert nova-core, Tyr and the PCI sample; add AsRepr/AsReprMut and
       transmute helpers with deferred size checks for representation
       conversions
 
     - Wrap ResourceSize in a transparent newtype with explicit conversions,
       including checked conversion to usize
 
   - PCI:
 
     - Add typed PCIe extended capability lookup and SR-IOV accessors for the
       First VF Offset and decoded VF BAR addresses and widths, keeping raw
       SR-IOV registers private to preserve PCI core ownership of their state
 
   - scatterlist:
 
     - Honor the device's maximum segment size as well as the DMA mapping limit
       when constructing SG tables
 
     - Return u32 from SGEntry::dma_len() to match the C segment length type
 
   - misc:
 
     - Validate auxiliary DeviceId name length explicitly to improve
       compile-time diagnostics for oversized device ID table entries
 
     - Drop unnecessary 'static bounds from debugfs ScopedDir file creation
       methods to support data containing non-'static references, including DMA
       buffers
 
 - misc:
 
   - Add Johan Hovold as driver core maintainer
 
   - Simplify platform_device_alloc() by returning early on allocation failure
 
   - Fix typos in driver core and kernfs comments
 -----BEGIN PGP SIGNATURE-----
 
 iJEEABYKADkWIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCatNacRsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMiwwLDMACgkQRZR3jtaqyi7YegD8ChAjvp7WireJHjodlAMA
 j2Ty0NLjR8715/Ml/QNxnTUA/1/Auj3pXS5/VesKPp+PU6VVB4IdjjHzuzSY+7sz
 y7wN
 =GYmP
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "Core:

   - Add TAINT_FORCED_BIND to taint the kernel and driver module before
     manual sysfs bind/unbind operations; make add_taint_module()
     available to driver core and update taint decoding tools and
     documentation

   - Constify device_show/store_*() attribute parameters and adapt x86
     MCE and perf users to prepare for const dev_ext_attribute instances

   - Fix UAF in NUMA access node registration failure handling by
     dropping the device reference with put_device() instead of directly
     freeing the node

  debugfs:

   - Make debugfs_create_str() read-only to eliminate double-free races
     between concurrent writers; reject writable modes; convert
     interconnect and SoundWire users to local file operations with
     mutex-protected strings

  kobject:

   - Fix out-of-bounds access in kobject_action_type() when parsing
     action strings containing embedded NUL bytes

   - Fix the kobject_set_name() reference in kset_register() kernel-doc

  Rust:

   - DMA:

      - Tie Coherent, CoherentBox and CoherentHandle to the device's
        bound lifetime to prevent retaining DMA allocations beyond
        driver unbind; propagate the lifetime through nova-core and the
        DMA sample driver

   - I/O:

      - Require explicit base types for registers and replace relative
        registers with typed subregion projections; reimplement
        register!() as a proc macro, support registers using existing
        types without inline bitfields, and convert nova-core, Tyr and
        the PCI sample; add AsRepr/AsReprMut and transmute helpers with
        deferred size checks for representation conversions

      - Wrap ResourceSize in a transparent newtype with explicit
        conversions, including checked conversion to usize

   - PCI:

      - Add typed PCIe extended capability lookup and SR-IOV accessors
        for the First VF Offset and decoded VF BAR addresses and widths,
        keeping raw SR-IOV registers private to preserve PCI core
        ownership of their state

   - scatterlist:

      - Honor the device's maximum segment size as well as the DMA
        mapping limit when constructing SG tables

      - Return u32 from SGEntry::dma_len() to match the C segment length
        type

   - misc:

      - Validate auxiliary DeviceId name length explicitly to improve
        compile-time diagnostics for oversized device ID table entries

      - Drop unnecessary 'static bounds from debugfs ScopedDir file
        creation methods to support data containing non-'static
        references, including DMA buffers

  Misc:

   - Add Johan Hovold as driver core maintainer

   - Simplify platform_device_alloc() by returning early on allocation
     failure

   - Fix typos in driver core and kernfs comments"

* tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits)
  rust: pci: add extended capability and SR-IOV support
  kobject: Fix the kobj_set_name reference in kset_register() kernel-doc
  rust: io: convert ResourceSize into a transparent newtype
  rust: scatterlist: return u32 from SGEntry::dma_len()
  MAINTAINERS: add myself as driver core maintainer
  debugfs: make debugfs_create_str() read-only
  soundwire: debugfs: replace writable string helper
  interconnect: debugfs: replace writable string helper
  docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted
  driver core: platform: Simplify platform_device_alloc()
  kobject: fix out-of-bounds access in kobject_action_type()
  rust: scatterlist: honor the device's maximum segment size
  driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
  module: fix up documentation for add_taint() and add_taint_module()
  module: pull out add_taint_module() to be public
  driver core: Constify the signature of device_show/store_*()
  drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
  x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
  rust: auxiliary: validate DeviceId name length
  driver core: fix typos in comments
  ...
2026-10-21 18:53:14 -10:00
Greg Kroah-Hartman
48671c0fac interconnect changes for 7.4
This pull request contains the following interconnect updates for
 the 7.4-rc1 merge window:
 
 - New driver for Kuno SoC
 - Make important drivers default
 - Add multi-port QoS programming support
 - Add support for Milos OSM L3
 - Misc cleanups and fixes
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEExQ4tCsdmOu34XfMFgNDMCsbYFmMFAmrMrpEACgkQgNDMCsbY
 FmNldg//c4qE2w/XMWN8HQuI45q5h91pqdAO3SlxTVGeud0lvI8M41OnkyoEYl8f
 a44vq6OAFvEgMorHc6cQfD/KII1je2tqgAPvMTxA/C5pIbHIuKlz/XB1Ifnkrj1a
 aHKSNrfiW7169i8/VcEWZlwHZEodnnLMF7JxSQILE34tgxV4DxOXx0PpRlrYlZKa
 wFEK4JyYEI4m3DKnZnxyWph85LqkSmqyt/eZcOutSp5J8KOdsVUHCXrWmIflhPGH
 8HBpUv8E+5XRPk4l3AWq6GddnqIEzOxcTrn+aa2hWtuNWT5HQek9jf4I24xi7cH4
 4TgjHsT5nBsuUifcEVU5PNtYVfmpOI4ng6RMpw0tb0uk7kBKUwd3x56X/eZOib6m
 yMJwiAQwvRUCL/IJx4y1t8tKLYfrvAUzeWiDWOuw3Zeh70YQ0tHQLjE8WESdoAyF
 n96zgAh8CUgx1uKX9d8QtbwxIwMDpQz6o7XYXGVvSYpJ4GYXbTLdGuZ1wUiWXbNl
 hM6Z04/T0IKfCsMFyQD2qS9017EZjZ+ZMtP4w7tmpsK8Bi1z7ftYJ87FHCTPU/Z5
 7x9PPATcJuShFU4rXi4rnml8GJoXejj97ANHkswLmUuMvPCumElldAUqum+Q2RUL
 +RVrVM2wAzy1nJ6/pL5yHZULqN99zSAH4hQj3W3P0sKkG5jpF7c=
 =xva9
 -----END PGP SIGNATURE-----

Merge tag 'icc-7.4-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 7.4

This pull request contains the following interconnect updates for
the 7.4-rc1 merge window:

- New driver for Kuno SoC
- Make important drivers default
- Add multi-port QoS programming support
- Add support for Milos OSM L3
- Misc cleanups and fixes

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-7.4-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (21 commits)
  interconnect: mediatek: fix Makefile typo for mt8196
  interconnect: qcom: fix endian annotations of BCM aux data
  interconnect: qcom: Skip get_bw on QoS programming providers
  interconnect: qcom: use 64-bit SMD RPM bus votes
  interconnect: qcom: msm8976: Configure auxiliary GPU QoS port
  interconnect: qcom: msm8996: Configure auxiliary Venus QoS port
  interconnect: qcom: icc-rpm: Program SMD RPM auxiliary QoS ports
  interconnect: qcom: icc-rpm: Handle icc_link_create() failures
  interconnect: qcom: implement get_bw with rpmh_read
  interconnect: exynos: Remove the PM QoS request on unbind
  interconnect: Add kernel-doc for devm_of_icc_get(), icc_enable() and icc_disable()
  interconnect: qcom: icc-rpm: Don't skip small votes
  interconnect: qcom: Move bcm_div() to common code
  interconnect: fix typo "commited" in comments
  interconnect: qcom: Constify struct qcom_icc_qosbox
  interconnect: qcom: Add Kuno interconnect provider driver
  dt-bindings: interconnect: Add Qualcomm Kuno NoC
  dt-bindings: interconnect: OSM L3: Document Milos OSM L3 compatible
  interconnect: qcom: Add missing depends to Hawi, Maili, Nord and Shikra
  interconnect: qcom: Make important drivers default
  ...
2026-10-13 15:52:40 +02:00
Georgi Djakov
3fd56a2833 Merge branch 'icc-misc' into icc-next
* icc-misc
  interconnect: qcom: Constify struct qcom_icc_qosbox
  interconnect: fix typo "commited" in comments
  interconnect: Add kernel-doc for devm_of_icc_get(), icc_enable() and icc_disable()
  interconnect: exynos: Remove the PM QoS request on unbind
  interconnect: qcom: implement get_bw with rpmh_read
  interconnect: qcom: Skip get_bw on QoS programming providers
  interconnect: qcom: fix endian annotations of BCM aux data
  interconnect: mediatek: fix Makefile typo for mt8196

Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-10-02 00:43:48 +03:00
Breno Rodrigues Alves
0fd42eec3e interconnect: mediatek: fix Makefile typo for mt8196
Correct a copy-paste typo in the MediaTek interconnect Makefile that
mapped mt8196.o to CONFIG_INTERCONNECT_MTK_MT8195 instead of MT8196.

Assisted-by: OpenCode AI
Signed-off-by: Breno Rodrigues Alves <breno3011alves@gmail.com>
Link: https://patch.msgid.link/20260905140113.21638-1-breno3011alves@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-10-02 00:41:11 +03:00
Rosen Penev
cdffc9152b interconnect: qcom: fix endian annotations of BCM aux data
struct qcom_icc_bcm::aux_data keeps a copy of the struct bcm_db read
from the command db, whose unit and width fields are annotated as
__le32/__le16 to describe the little-endian on-disk format. Using
those restricted types directly in bandwidth calculations makes sparse
complain about endianness.

Keep aux_data typed as struct bcm_db, copied verbatim from the command
db buffer, and convert the fields with le32_to_cpu()/le16_to_cpu() at
the places where unit and width are used. No functional change.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609221350.3Y8MOce9-lkp@intel.com/
Assisted-by: LLM
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260923185059.25196-1-rosenp@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-10-02 00:41:11 +03:00
Yichong Chen
493daf5bf2 interconnect: debugfs: replace writable string helper
debugfs_create_str() is being made read-only because its generic write
path is hard to make safe without adding more locking to the helper.

Convert the interconnect debugfs client src_node and dst_node entries to
local file operations before removing writable string support from
debugfs_create_str().  Protect the string replacement and path lookup with
the existing debugfs_lock.

The old code duplicated the strings under rcu_read_lock(), so it had to use
GFP_ATOMIC.  The local file operations protect src_node and dst_node with
debugfs_lock instead, so the allocation can use GFP_KERNEL.

Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
Link: https://patch.msgid.link/20260807100053.1089834-2-chenyichong@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-01 14:48:25 +02:00
Shawn Guo
e0667aa9c6 interconnect: qcom: Skip get_bw on QoS programming providers
Programming the static QoS configuration in qcom_icc_rpmh_probe()
touches NoC registers directly, and nothing in that path clocks or
powers the NoC first.  It has been working only because the
interconnect core used to vote every node to INT_MAX while adding it,
and that vote stays in hardware until sync_state.

Reading the boot-time AMC votes back from RPMh removed that implicit
guarantee: a NoC whose BCMs come out of the bootloader unvoted is now
left unclocked, and the first QoS register access aborts.  On Qualcomm
Nord SoC, the MMSS NoC dies while programming qnm_camnoc_hf, taking the
board down before rootfs:

  Internal error: synchronous external abort: 0000000096001610
    regmap_mmio_read32le+0xc/0xa4
    regmap_update_bits_base+0x64/0x98
    qcom_icc_rpmh_probe+0x44c/0x540

Only install the get_bw() callback for providers that do not program
QoS, i.e. those without a regmap config.  Providers that do program
QoS keep the previous INT_MAX initial votes, so their register
accesses stay safe, and the rest keep the benefit of honouring the
boot-time votes.

Reported-by: Bartosz Golaszewski <brgl@kernel.org>
Fixes: 11a44c6087 ("interconnect: qcom: implement get_bw with rpmh_read")
Assisted-by: LLM
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tested-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922020623.398913-1-shengchao.guo@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-22 16:59:22 +03:00
Georgi Djakov
07bf225c62 Merge branch 'icc-rpm' into icc-next
This series brings multi-port QoS programming and squashes some
minor existing issues.

* icc-rpm
  interconnect: qcom: Move bcm_div() to common code
  interconnect: qcom: icc-rpm: Don't skip small votes
  interconnect: qcom: icc-rpm: Handle icc_link_create() failures
  interconnect: qcom: icc-rpm: Program SMD RPM auxiliary QoS ports
  interconnect: qcom: msm8996: Configure auxiliary Venus QoS port
  interconnect: qcom: msm8976: Configure auxiliary GPU QoS port
  interconnect: qcom: use 64-bit SMD RPM bus votes

Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-0-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 20:13:37 +03:00
Konrad Dybcio
24e7422ce3 interconnect: qcom: use 64-bit SMD RPM bus votes
SMD RPM bus bandwidth requests carry a 64-bit bandwidth value.
The interconnect proxy declared the KVP payload as u32, truncating
votes above 4 GiB/s and advertising the wrong payload size to RPM.

Use a little-endian 64-bit payload and accept a u64 value in the proxy
API. This has always been the right behavior, even on msm-3.10 and
32-bit SoCs.

Fixes: be06f8e742 ("interconnect: qcom: Add interconnect RPM over SMD driver")
Assisted-by: LLM
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Gopikrishna Garmidi <gopikrishna.garmidi@oss.qualcomm.com>
Link: https://patch.msgid.link/20260904-topic-icc_rpm_64b_req-v1-1-37e24f1991a3@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:49:36 +03:00
Konrad Dybcio
cc91c1b991 interconnect: qcom: msm8976: Configure auxiliary GPU QoS port
Enable the secondary QoS port used by the MSM8976 GPU node.

Assisted-by: LLM
Fixes: 6e3ea1f36b ("interconnect: qcom: Add MSM8976 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-6-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:49:35 +03:00
Konrad Dybcio
aa4c405d47 interconnect: qcom: msm8996: Configure auxiliary Venus QoS port
Enable the secondary QoS port used by the MSM8996 Venus node.

Assisted-by: LLM
Fixes: 7add937f52 ("interconnect: qcom: Add MSM8996 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-5-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:49:35 +03:00
Konrad Dybcio
ddbacca26d interconnect: qcom: icc-rpm: Program SMD RPM auxiliary QoS ports
Some SMD RPM interconnect nodes own two QoS ports. Currently, the code
only takes care of one, leaving some endpoints partially unconfigured.

Keep qos_port as the primary port and describe the optional second port
with aux_qos_port.

Assisted-by: LLM
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-4-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:49:35 +03:00
Konrad Dybcio
b2079a6b8e interconnect: qcom: icc-rpm: Handle icc_link_create() failures
icc_link_create() can return errors. Don't ignore them.

Assisted-by: LLM
Fixes: 30c8fa3ec6 ("interconnect: qcom: Add MSM8916 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-3-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:49:26 +03:00
Neil Armstrong
11a44c6087 interconnect: qcom: implement get_bw with rpmh_read
Since we can actually read back the APPS rpmh interconnect
BCM votes we can actually implement the get_bw() callback
and provide a coherent average and peak bandwidth at probe time.

The benefits of that are:
- keep disabled BCMs disabled
- avoid voting unused BCMs to INT_MAX

If the interconnects are correctly described for a platform,
all the required BCMs would be voted to the maximum bandwidth
until sync_state is reached.

Since we only get the BCM vote, we need to redistribute
the vote values to the associated nodes. The initial BCM
votes are read back at probe time in order to be ready when
the get_bw() is called when a node is added.

Tested-by: Georgi Djakov <djakov@kernel.org> #db845c
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-sm8x50-icc-read-rpmh-v3-1-2bc65d7b25e5@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:44:06 +03:00
Myeonghun Pak
601a54f007 interconnect: exynos: Remove the PM QoS request on unbind
The Exynos interconnect provider adds a minimum-frequency PM QoS request
to its parent devfreq device. The request is embedded in the provider's
device-managed private data.

The probe error path removes the request, but the remove callback does
not. Unbinding the provider while the parent device remains registered
therefore frees the private data with the request still on the parent's
QoS list. The child's device cleanup does not remove requests registered
against its parent.

Remove the request after deregistering the provider, before the private
data is released.

This issue was identified during our ongoing static-analysis research while
reviewing kernel code.

Fixes: 2f95b9d5cf ("interconnect: Add generic interconnect driver for Exynos SoCs")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260911031750.8182-1-mhun512@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-18 13:44:05 +03:00
Georgi Djakov
65ec39aad4 Merge branch 'icc-kuno' into icc-next
Add interconnect (NoC) provider driver for the Qualcomm Kuno SoC.

* icc-kuno
  dt-bindings: interconnect: Add Qualcomm Kuno NoC
  interconnect: qcom: Add Kuno interconnect provider driver

Link: https://patch.msgid.link/20260827-kuno-soc-support-v5-0-6d47636a8f09@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-16 19:36:26 +03:00
Marc Zyngier
2cc67425a9 Revert "interconnect: qcom: x1e80100: enable QoS configuration"
This reverts commit 5a8b2cc36e.

Since the introduction of this QoS change, X1 machines based on the
Purwa SoC (such as the Lenovo Mini X) take a hard reset at boot time.

Other machines based on Hamoa (such as the X1E001DE Snapdragon Devkit)
end-up with a similar hard reset while under load, most likely due to
the PCIe ports being starved of traffic.

Revert the whole thing until someone figures out what magic parameters
allow QoS to work in a sensible manner, as a usable machine is somehow
preferable to one that crashes efficiently.

Link: https://lore.kernel.org/all/apgeBNSiP01YfNcs@google.com
Link: https://lore.kernel.org/all/86ld9d4h4n.wl-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Georgi Djakov <djakov@kernel.org>
Cc: Raviteja Laggyshetty <raviteja.laggyshetty@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Abel Vesa <abelvesa@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Mostafa Saleh <smostafa@google.com>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Closes: https://krzk.eu/#/builders/102/builds/70/steps/23/logs/warnings__3_
Link: https://patch.msgid.link/20260915123703.3228329-1-maz@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-16 15:55:38 +03:00
Karl Mehltretter
77cac270e3 interconnect: Add kernel-doc for devm_of_icc_get(), icc_enable() and icc_disable()
Documentation/driver-api/interconnect.rst lists devm_of_icc_get(),
icc_enable() and icc_disable() in its kernel-doc directive for
drivers/interconnect/core.c, but none of the three functions has a
kernel-doc comment. The directive silently produces nothing for them, so
the consumer API section of the rendered documentation never shows
them.

Add kernel-doc comments in the style of the neighbouring functions.

Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260912115456.89169-1-kmehltretter@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-16 15:53:05 +03:00
Konrad Dybcio
40ea86fa38 interconnect: qcom: icc-rpm: Don't skip small votes
Small votes (such as 1 or 100) can end up being rounded down to 0
midway through the calculations. Use qcom_bw_div() when dividing to
prevent that.

Assisted-by: LLM
Fixes: 30c8fa3ec6 ("interconnect: qcom: Add MSM8916 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-2-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-16 15:31:06 +03:00
Konrad Dybcio
51797517fa interconnect: qcom: Move bcm_div() to common code
This helper is useful for both SMD_RPM and RPMH code, extract it.

Assisted-by: LLM
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-1-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-16 15:30:53 +03:00
Hemanth Selam
31a3959d87 interconnect: fix typo "commited" in comments
Correct "commited" to "committed", reported by scripts/checkpatch.pl using
the misspelling list in scripts/spelling.txt.  Only touches comments, no
code changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260904111632.29262-1-hemanth.selam@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-09 15:24:20 +03:00
Christophe JAILLET
4e8e7c057e interconnect: qcom: Constify struct qcom_icc_qosbox
'struct qcom_icc_qosbox' are not modified in these drivers.

Constifying these structures moves some data to a read-only section, so
increases overall security.

On a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
   7807	  18632	      0	  26439	   6747	drivers/interconnect/qcom/eliza.o
  10027	  20176	      0	  30203	   75fb	drivers/interconnect/qcom/milos.o
   8768	  22640	      0	  31408	   7ab0	drivers/interconnect/qcom/sm6350.o
   7626	  22000	      0	  29626	   73ba	drivers/interconnect/qcom/sm8650.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
   8095	  18344	      0	  26439	   6747	drivers/interconnect/qcom/eliza.o
  11079	  19120	      0	  30199	   75f7	drivers/interconnect/qcom/milos.o
   9668	  21744	      0	  31412	   7ab4	drivers/interconnect/qcom/sm6350.o
   8746	  20880	      0	  29626	   73ba	drivers/interconnect/qcom/sm8650.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/f9d9ab49e961b3bf3f9bad39f22cf8b06afb2381.1786554463.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-09 15:14:19 +03:00
Hardeep Sharma
8658231bef interconnect: qcom: Add Kuno interconnect provider driver
Add the interconnect provider driver for the Qualcomm Kuno SoC to
enable bus bandwidth voting on the platform. This includes the
aggre-noc and cnoc-main NoC instances with their associated BCM
nodes.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Hardeep Sharma <hardeep.sharma@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260827-kuno-soc-support-v5-7-6d47636a8f09@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-09 14:34:32 +03:00
Krzysztof Kozlowski
c8604ebb5d interconnect: qcom: Add missing depends to Hawi, Maili, Nord and Shikra
Hawi, Maili, Nord and Shikra were added in parallel or after
commit 5b696f0658 ("interconnect: qcom: Restrict drivers per
ARM/ARM64"), thus they missed the update restricting them per
architecture (with the same rationale).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260720-interconnect-qcom-clean-arm64-v3-2-942e8ee7ebda@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-08 13:14:59 +03:00
Krzysztof Kozlowski
bd2b723bae interconnect: qcom: Make important drivers default
The interconnect drivers for Qualcomm SoC Network-on-Chip are covering a
basic or fundamental SoC feature: bandwidth management between internal
SoC blocks.  SoC can boot without these, but power management or
performance will be affected.  These drivers do not represent any sort
of buses visible to the board designers/configurators, thus they should
be always enabled, regardless how SoC is used in the final board.

Kernel configuration should not ask users choice of drivers when that
choice is obvious and known to the developers that answer should be
'yes' or 'module'.

Switch all almost Qualcomm interconnect drivers to a default 'yes' for
ARCH_QCOM.  This has impact:

1. arm64 defconfig:
   a. Enable as built-in INTERCONNECT_QCOM_HAWI, INTERCONNECT_QCOM_NORD,
      INTERCONNECT_QCOM_SDM660, INTERCONNECT_QCOM_SDM670,
      INTERCONNECT_QCOM_SM7150 and INTERCONNECT_QCOM_SAR2130P, which
      were not selected before but should be, because these platforms
      need them anyway for proper functioning.

   b. Switch to built-in from a module INTERCONNECT_QCOM_QCS404 and
      INTERCONNECT_QCOM_MSM8916, which as modules would not make the
      platform bootable in most cases, and INTERCONNECT_QCOM_OSM_L3,
      which when module might slow down boot considerably by having
      caches running at slow speed.

2. arm qcom_defconfig: Switch to built-in from a module
   INTERCONNECT_QCOM_RPMH, INTERCONNECT_QCOM_SMD_RPM,
   INTERCONNECT_QCOM_BCM_VOTER, INTERCONNECT_QCOM_MSM8974,
   INTERCONNECT_QCOM_SDX55, which as modules would not make the
   platform bootable in most cases.

3. arm multi_v7 defconfig: Enable drivers necessary to boot
   ARM 32-bit platforms, which are already enabled on qcom_defconfig:

   a. Enable as built-in INTERCONNECT_QCOM_MSM8974.
   b. Enable as modules (other dependencies prevent from built-in)
      INTERCONNECT_QCOM_RPMH, INTERCONNECT_QCOM_BCM_VOTER and
      INTERCONNECT_QCOM_SDX55.

4. COMPILE_TEST builds: Enable by default all drivers for arm or arm64
   builds, whenever ARCH_QCOM is selected.  This has impact on build
   time and feels logical, because if one selects ARCH_QCOM then
   probably by default wants to build test it entirely.  Kernels with
   COMPILE_TEST are not supposed to be used for booting.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260720-interconnect-qcom-clean-arm64-v3-1-942e8ee7ebda@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-08 13:14:59 +03:00
Raviteja Laggyshetty
b62f6c2765 interconnect: qcom: Enable Shikra interconnect driver by default for ARCH_QCOM
Interconnect drivers provide fundamental NoC bandwidth management
required for correct system behavior. Although systems can boot without
them, power and performance are impacted.
These drivers need to enabled irresepective of the board variant, design
or configuration.

Enable the Shikra interconnect driver by default on ARCH_QCOM by setting
 "default ARCH_QCOM".

Signed-off-by: Raviteja Laggyshetty <raviteja.laggyshetty@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260526-shikra_icc_kconfig-v1-1-c589db2d023c@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-09-08 13:14:59 +03:00
Greg Kroah-Hartman
1f7267d804 This pull request contains the following interconnect updates for
the 7.3-rc1 merge window:
 
 - New driver for Maili SoC
 - Add support for QoS on the SC8280XP SoC
 - Add support for QoS on the x1e80100 SoC
 - Add EPSS L3 scaling support for Shikra SoC
 - Add COMPILE_TEST support for some platforms
 - Misc tiny improvements and fixes
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEExQ4tCsdmOu34XfMFgNDMCsbYFmMFAmp50fIACgkQgNDMCsbY
 FmNyvg//XKv2VA3p0gpp/WsY3uVX8HJ4aXZpwzI+dTNyIVKA/c/jCMygTzRH2Ob4
 pA16lU1pKhbC82OJg4upa4OTHZ+U6qphItn/zlreXrPA7MsDiCijido+uQW+s82p
 wP+k1/3rMBjafDcJWnw858vDBSXJOoFZ1gbEVLcTd/4cBAVccM0Na4fhSLF4mQFR
 FxYEeWmtI1GllPgmgs7LhSgSN0JvjYmnZnqmic4cejGljn/lQP9PhP/e/p8Iu22I
 q+l/vHYloaTCnVtJOv4W7g7xJW6MZ/dVpjqC1mLVm1XnUyp+5J12Ga+kBFWyVGv+
 Yh8eom3FG91haQKWW6O8tesL7uVTALLtthsV2IvA2F2SIgg0DR2ysD04tqACZlqj
 gUzlW/g8B5RA10UShg36oPRIAsvwAabeEZN9QqmAQna6Z7//xidH7ZX4Wbn8vldu
 OQd0ly+obNsIlnlnuzI754sJDe5qSeMrjPfD4wD8+qyrPLa7tRgjj65XRY/BB8Fj
 UDF4FjPh+Io9yTm67imZVM0cXwBMVbwadHNNjYDu3UkqJi3TiZoOInN5H5n+Q6z/
 QvUUHd0yccmf4ldjzvzpaECC1Ozx9QHs1UVd/SfAcjgUVdwY9JMNA3S/3uIE5vGv
 DxpZk6jIwq0zWwHM2A31N0tnwRflQ/1hLj2cHM4z43FQyEcBfcI=
 =UR/X
 -----END PGP SIGNATURE-----

Merge tag 'icc-7.3-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

This pull request contains the following interconnect updates for
the 7.3-rc1 merge window:

- New driver for Maili SoC
- Add support for QoS on the SC8280XP SoC
- Add support for QoS on the x1e80100 SoC
- Add EPSS L3 scaling support for Shikra SoC
- Add COMPILE_TEST support for some platforms
- Misc tiny improvements and fixes

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-7.3-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: Fix use after free in icc_get() and of_icc_get_by_index()
  interconnect: debugfs-client: add NULL check for platform_device_alloc
  interconnect: qcom: simplify allocation
  interconnect: qcom: add COMPILE_TEST
  interconnect: qcom: add Maili interconnect provider driver
  dt-bindings: interconnect: qcom: document the RPMh Network-On-Chip interconnect in Maili SoC
  interconnect: qcom: Add EPSS L3 scaling support for Shikra SoC
  dt-bindings: interconnect: qcom,osm-l3: Add EPSS L3 DT binding for Qualcomm Shikra SoC
  interconnect: qcom: x1e80100: enable QoS configuration
  dt-bindings: interconnect: qcom,x1e80100-rpmh: add clocks property to enable QoS
  interconnect: qcom: sc8280xp: Enable QoS configuration
  dt-bindings: interconnect: qcom,sc8280xp-rpmh: Add reg and clocks for QoS
2026-08-19 09:55:37 +02:00
Georgi Djakov
9621c81fd2 Merge branch 'icc-misc' into icc-next
* icc-misc
  interconnect: qcom: add COMPILE_TEST
  interconnect: qcom: simplify allocation
  interconnect: debugfs-client: add NULL check for platform_device_alloc
  interconnect: Fix use after free in icc_get() and of_icc_get_by_index()

Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 13:51:41 +03:00
Georgi Djakov
0752296461 Merge branch 'icc-maili' into icc-next
Add interconnect bindings and RPMh-based interconnect driver support for
the upcoming Qualcomm Maili SoC.

* icc-maili
  dt-bindings: interconnect: qcom: document the RPMh Network-On-Chip interconnect in Maili SoC
  interconnect: qcom: add Maili interconnect provider driver

Link: https://patch.msgid.link/20260622-maili_icc-v2-0-18b5ac08c04f@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 13:51:09 +03:00
Georgi Djakov
d5aee2777e Merge branch 'icc-shikra' into icc-next
Add Epoch Subsystem (EPSS) L3 scaling support on Qualcomm Shikra SoC.
EPSS hardware on Shikra is similar to other SoCs but supports only twelve
L3 frequency entries (LUT). Reading the LUT beyond supported frequencies
can expose incorrect frequencies.
Introduce new compatible to represent this constrained variant of EPSS.

* icc-shikra
  dt-bindings: interconnect: qcom,osm-l3: Add EPSS L3 DT binding for Qualcomm Shikra SoC
  interconnect: qcom: Add EPSS L3 scaling support for Shikra SoC

Link: https://patch.msgid.link/20260603-shikra_epss_l3-v3-0-3c2e0b796e78@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 13:50:47 +03:00
Kuan-Wei Chiu
25c7e242ac interconnect: Fix use after free in icc_get() and of_icc_get_by_index()
In of_icc_get_by_index() and icc_get(), if the dynamic allocation for
path->name fails via kasprintf(), the error handling path directly
calls kfree(path) to free the path object and returns an error.

However, prior to this point, path_find() calls path_init(), which
already links the path's requests into the req_list of the respective
interconnect nodes via hlist_add_head(). Directly invoking kfree(path)
leaves dangling pointers in the hlist. A subsequent call to icc_get()
or icc_set_bw() will traverse or modify these corrupted lists, triggering
a slab use afterfree.

KASAN report showing the vulnerability when reproducing via debugfs:

  BUG: KASAN: slab-use-after-free in path_find+0x6f8/0xcfc
  Write of size 8 at addr fff000000d43f748 by task sh/1
  ...
  Call trace:
   kasan_report+0xac/0xfc
   path_find+0x6f8/0xcfc
   icc_get+0x148/0x380
   icc_get_set+0xf8/0x2d0
  ...
  Freed by task 1:
   kfree+0x1a0/0x4a4
   icc_get+0x2cc/0x380
   icc_get_set+0xf8/0x2d0

Fix this by replacing kfree(path) with the proper teardown function,
icc_put(path), which safely removes the requests from the req_list using
hlist_del() and drops the provider usage references before freeing the
memory.

Additionally, in icc_get(), ensure that the icc_lock mutex is released
prior to calling icc_put(path) to avoid a deadlock, as icc_put()
internally acquires the same lock.

Fixes: 3791163602 ("interconnect: Handle memory allocation errors")
Cc: stable@vger.kernel.org
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Link: https://patch.msgid.link/20260416190840.1753468-1-visitorckw@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 13:38:11 +03:00
Li Jun
ecf20a5e15 interconnect: debugfs-client: add NULL check for platform_device_alloc
platform_device_alloc() may return NULL when memory allocation fails.
Add proper error handling to prevent a potential NULL pointer
dereference when calling platform_device_add() with a NULL pointer.

Signed-off-by: Li Jun <lijun01@kylinos.cn>
Link: https://patch.msgid.link/20260602103120.2966458-1-lijun01@kylinos.cn
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 12:36:47 +03:00
Rosen Penev
bd8a131fbe interconnect: qcom: simplify allocation
Use a flexible array member to reduce allocation by 1.

Add __counted_by for extra runtime analysis. Move counting variable
assignment after allocation before any array access.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260609222454.37352-1-rosenp@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 12:14:24 +03:00
Rosen Penev
c96fc14322 interconnect: qcom: add COMPILE_TEST
Allow non-ARM to build this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260608050542.6167-1-rosenp@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-22 12:13:57 +03:00
Raviteja Laggyshetty
fb8190f09b interconnect: qcom: add Maili interconnect provider driver
Add driver for the Qualcomm interconnect buses found in Maili
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.

Co-developed-by: Odelu Kukatla <odelu.kukatla@oss.qualcomm.com>
Signed-off-by: Odelu Kukatla <odelu.kukatla@oss.qualcomm.com>
Signed-off-by: Raviteja Laggyshetty <raviteja.laggyshetty@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260622-maili_icc-v2-2-18b5ac08c04f@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-07 17:18:03 +03:00
Raviteja Laggyshetty
b148c1f785 interconnect: qcom: Add EPSS L3 scaling support for Shikra SoC
Add Epoch Subsystem (EPSS) L3 interconnect provider support on
Qualcomm Shikra SoC.

The EPSS L3 block on Shikra SoC is similar to existing Qualcomm EPSS/OSM
L3 providers, but supports only up to 12 frequency lookup table entries.
Reading beyond the supported LUT entries can expose incorrect frequencies.
Add shikra-specific EPSS descriptor shikra_epss_l3_perf_state that reuses
existing EPSS configuration with appropriate LUT entries limit.

Co-developed-by: Odelu Kukatla <odelu.kukatla@oss.qualcomm.com>
Signed-off-by: Odelu Kukatla <odelu.kukatla@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Raviteja Laggyshetty <raviteja.laggyshetty@oss.qualcomm.com>
Link: https://patch.msgid.link/20260603-shikra_epss_l3-v3-2-3c2e0b796e78@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-07 17:06:52 +03:00
Georgi Djakov
3b828034ad Merge branch 'icc-x1e80100' into icc-next
This series enables QoS configuration for QNOC type device which
can be found on X1E80100 platform. It enables QoS configuration
for master ports with predefined priority and urgency forwarding.
This helps in prioritizing the traffic originating from different
interconnect masters at NOC (Network On Chip).

The system may function normally without this feature. However,
enabling QoS helps optimize latency and bandwidth across subsystems
like CPU, GPU, and multimedia engines, which becomes important in
high-throughput scenarios. This is a feature aimed at performance
enhancement to improve system performance under concurrent workloads.

* icc-x1e80100
  dt-bindings: interconnect: qcom,x1e80100-rpmh: add clocks property to enable QoS
  interconnect: qcom: x1e80100: enable QoS configuration

Link: https://patch.msgid.link/20260527-x1e80100_qos-v2-0-305c6539e6d2@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-07 16:32:56 +03:00
Raviteja Laggyshetty
5a8b2cc36e interconnect: qcom: x1e80100: enable QoS configuration
Enable QoS configuration for master ports with predefined priority
and urgency forwarding.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Raviteja Laggyshetty <raviteja.laggyshetty@oss.qualcomm.com>
Link: https://patch.msgid.link/20260527-x1e80100_qos-v2-2-305c6539e6d2@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-07 16:32:10 +03:00
Xilin Wu
3ee8b9b7c4 interconnect: qcom: sc8280xp: Enable QoS configuration
Enable static QoS configuration for SC8280XP NoC master ports with
predefined priority and urgency forwarding values.

Add the QoS box data for the SC8280XP providers, add regmap configurations
for the real NoCs, and mark only aggre1_noc and aggre2_noc as requiring
clocks for QoS register access.

Signed-off-by: Xilin Wu <sophon@radxa.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260507-sc8280xp-qos-v1-2-15135858cd98@radxa.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-07-07 14:54:21 +03:00
Uwe Kleine-König (The Capable Hub)
995832b2ce Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)
Replace the #include of <linux/mod_devicetable.h> by the more specific
<linux/device-id/*.h> where applicable. For most cases the include
can be dropped completely, only a few drivers need one or two headers
added.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-07-03 07:38:17 +02:00
Linus Torvalds
8c04c1292d This is all clk driver updates. Mostly new SoC support for
various Qualcomm chips and Canaan K230. Otherwise there's
 non-critical fixes and updates to clk data such as adding missing
 clks to existing drivers or marking clks critical. Nothing looks
 especially exciting.
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmo9Q6oUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSXXFA/9GpTMt3p0Mi/sT/AszYTU+RsVXGpW
 q7XQ3MnO6rzd/NvzVGTptmQdbOj54jl1yXosEmTs+Won9OtSuOPjxVamtDRTJMpl
 YOT5ixy4JNVBxwdxgyrSIoEQ6+MhTj91uBXA74MiO6Kk2CFTEHafTQC2P0HQyPv9
 aaHx53ViKM6UwI6IgWajfmRS8CMzWlEjPFF6v9zG8vWAls22J1SkrW5h7ovFJM2F
 osl6OkNc6prRc0gOrhzmtekX2e1e3Eg9HKlXwNV58LRtysXMpmqTm2zYvxv0iltb
 GV2V5fX9fcJI45dWOGStxJ2mO6NswDWjNYF9kFefvpqVrRRluhX+Af9/bbqTwVXt
 +PEHsdJYRTzlaIbMuGfASTqmo6Sp5MkHG1PV5tAQglX16yVNMqk11gjoPHVA4zEF
 CRkC494s4nX2XMM85MBeqTyh8bue0LQqz9QAsUBaU0XRvJJhDMw81P34QOFTfq9n
 UEBmnv+dRqsHvXQsJzB+8q+F+kx12M3GIkGqX/O1eZT+9sGjTVY3XFIbvH01vN4W
 OGUB9q6ZixD25d8MA6mussel2O6An4S7NU+zRsSz1xZd2W7IGNtk908dr7mJOh13
 8rG9DW73XRpKNYhX/IszDFjyPHUuZPYU8RyYTwf63ADGJHVVFcHZ78V4ORuPh2AY
 TnZt1wOsq1a/xd8=
 =hEhO
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "This is all clk driver updates. Mostly new SoC support for various
  Qualcomm chips and Canaan K230. Otherwise there's non-critical fixes
  and updates to clk data such as adding missing clks to existing
  drivers or marking clks critical. Nothing looks especially exciting"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (106 commits)
  clk: qcom: regmap-phy-mux: Rework the implementation
  clk: qcom: a53: Corrected frequency multiplier for 1152MHz
  clk: qcom: camcc-milos: Declare icc path dependency for CAMSS_TOP_GDSC
  clk: qcom: gdsc: Support enabling interconnect path for power domain
  dt-bindings: clock: qcom,milos-camcc: Document interconnect path
  interconnect: Add devm_of_icc_get_by_index() as exported API for users
  clk: qcom: camcc-x1p42100: Add support for camera clock controller
  clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks
  clk: qcom: videocc-x1p42100: Add support for video clock controller
  dt-bindings: clock: qcom: Add X1P42100 camera clock controller
  dt-bindings: clock: qcom: Add X1P42100 video clock controller
  clk: keystone: sci-clk: fix application of sizeof to pointer
  clk: keystone: don't cache clock rate
  clk: spacemit: k3: Add PCIe DBI clock
  dt-bindings: soc: spacemit: k3: Add PCIe DBI clock IDs
  clk: spacemit: k3: Fix PCIe clock register offset
  clk: spacemit: k3: Switch to pll2_d6 as parent for PCIe clock
  clk: at91: keep securam node alive while mapping it
  clk: samsung: exynos990: Fix PERIC0/1 USI clock types
  clk: renesas: r9a08g045: Drop unused pm_domain header file
  ...
2026-06-25 12:48:57 -07:00
Luca Weiss
771ed1b129 interconnect: Add devm_of_icc_get_by_index() as exported API for users
Users can use devm version of of_icc_get_by_index() to benefit from
automatic resource release.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Acked-by: Georgi Djakov <djakov@kernel.org>
Link: https://lore.kernel.org/r/20260501-milos-camcc-icc-v2-1-bb83c1256cc3@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2026-06-06 19:51:14 -05:00
Georgi Djakov
94fe92d2f6 Merge branch 'icc-misc' into icc-next
* icc-misc
  interconnect: Do not create empty devres on missing interconnects
  interconnect: Move MODULE_DEVICE_TABLE next to the table itself
  dt-bindings: interconnect: qcom,sdm660: Disallow clocks when appropriate
  dt-bindings: interconnect: qcom,sm6115: Drop incorrect children if:then: block
  dt-bindings: interconnect: qcom,sm6115: Restrict children and clocks
  interconnect: qcom: Fix indentation
  interconnect: qcom: Restrict drivers per ARM/ARM64

Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-22 10:41:01 +03:00
Georgi Djakov
0d0a40e3f8 Merge branch 'icc-hawi' into icc-next
Add interconnect bindings and RPMh-based interconnect
driver support for the upcoming Qualcomm Hawi SoC.

* icc-hawi
  dt-bindings: interconnect: qcom-bwmon: Add Hawi cpu-bwmon compatible
  dt-bindings: interconnect: qcom-bwmon: Add Hawi llcc-bwmon compatible
  dt-bindings: interconnect: qcom: document the RPMh NoC for Hawi SoC
  interconnect: qcom: add Hawi interconnect provider driver

Link: https://patch.msgid.link/20260506-icc-hawi-v4-0-35447fdc482b@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-21 22:52:10 +03:00
Vivek Aknurwar
ffaa88a084 interconnect: qcom: add Hawi interconnect provider driver
Add driver for the Qualcomm interconnect buses found in Hawi
based platforms. The topology consists of several NoCs that are
controlled by a remote processor that collects the aggregated
bandwidth for each master-slave pair.

Reviewed-by: Mike Tipton <mike.tipton@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Vivek Aknurwar <vivek.aknurwar@oss.qualcomm.com>
Link: https://patch.msgid.link/20260506-icc-hawi-v4-2-35447fdc482b@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-21 22:51:30 +03:00
Georgi Djakov
67a4412db0 Merge branch 'icc-eliza' into icc-next
Add the missing Eliza SDCC1 interconnect slave ID and provider node.

The Eliza interconnect binding and provider already describe SDCC2, but
the matching SDCC1 CNOC CFG slave was left out. Add the binding constant
and the provider node so consumers can describe SDCC1 bandwidth paths.

The provider change also adds qhs_sdc1 to qsm_cfg and bcm_cn0, and updates
the qsm_cfg link count and bcm_cn0 node count.

* icc-eliza
  dt-bindings: interconnect: qcom,eliza-rpmh: Add SDCC1 slave
  interconnect: qcom: eliza: Add SDCC1 slave node

Link: https://patch.msgid.link/20260514-eliza-interconnect-add-missing-sdcc1-slave-node-v2-0-13c03bc890cb@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-21 20:58:17 +03:00
Georgi Djakov
21f951515a Merge branch 'icc-nord' into icc-next
This adds RPMh-based interconnect support for the Qualcomm Nord SoC.

The Nord SoC features a rich Network-on-Chip topology comprising 19 NoCs
including aggregate NoCs, a high-speed configuration NoC (HSCNOC), a
multimedia NoC, four NSP data NoCs for AI/ML workloads, PCIe inbound and
outbound NoCs, a system NoC, and virtual clock/MC nodes. Bandwidth requests
are communicated to the RPMh hardware through Bus Clock Manager (BCM)
resources via the Resource State Coordinator (RSC).

* icc-nord
  dt-bindings: interconnect: Document RPMh Network-On-Chip for Qualcomm Nord SoC
  interconnect: qcom: Add interconnect provider driver for Nord SoC

Link: https://patch.msgid.link/20260510020607.1129773-1-shengchao.guo@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-21 20:57:37 +03:00
Abel Vesa
caeab82fbe interconnect: qcom: eliza: Add SDCC1 slave node
The Eliza interconnect provider is missing the SDCC1 CNOC CFG slave
node. Add qhs_sdc1 to the provider node table so SDCC1 interconnect
paths can resolve to a provider node.

Hook qhs_sdc1 up to qsm_cfg and CN0, and bump the corresponding
qsm_cfg.num_links and bcm_cn0.num_nodes counts.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260514-eliza-interconnect-add-missing-sdcc1-slave-node-v2-2-13c03bc890cb@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-15 10:21:19 +03:00
Krzysztof Kozlowski
5b696f0658 interconnect: qcom: Restrict drivers per ARM/ARM64
There is no point to allow selecting core SoC drivers like interconnects
for Qualcomm ARMv7 SoCs when building ARM64 kernel, and vice versa.

This makes kernel configuration more difficult as many do not remember
the Qualcomm SoCs model names/numbers and their properties like
architecture.  No features should be lost because:
1. There won't be a single image for ARMv7 and ARMv8/9 SoCs.
2. Newer ARMv8/9 SoCs won't be running in arm32 emulation mode.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260428-interconnect-qcom-clean-arm64-v1-2-e6bc3f7832db@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2026-05-10 13:18:48 +03:00