Commit graph

1,461,726 commits

Author SHA1 Message Date
Luca Ceresoli
27312a8f24 drm/debugfs: show lingering bridges
The usefulness of /sys/kernel/debug/dri/bridges is limited as it only shows
bridges between drm_bridge_add() and drm_bridge_remove(). However
refcounted bridges can stay allocated and lingering for a long time after
drm_bridge_remove(), and a memory leak due to a missing drm_bridge_put()
would not be visible in this debugfs file.

Add lingering bridges to the /sys/kernel/debug/dri/bridges output.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250915-drm-bridge-debugfs-removed-v9-2-6e5c0aff5de9@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2025-09-23 22:20:05 +02:00
Luca Ceresoli
17805a15d1 drm/bridge: add list of removed refcounted bridges
Between drm_bridge_add() and drm_bridge_remove() bridges are registered to
the DRM core via the global bridge_list and visible in
/sys/kernel/debug/dri/bridges. However between drm_bridge_remove() and the
last drm_bridge_put() memory is still allocated even though the bridge is
not registered, i.e. not in bridges_list, and also not visible in
debugfs. This prevents debugging refcounted bridges lifetime, especially
leaks due to a missing drm_bridge_put().

In order to allow debugfs to also show the removed bridges, move such
bridges into a new ad-hoc list until they are eventually freed.

Note this requires adding INIT_LIST_HEAD(&bridge->list) in the bridge
initialization code. The lack of such init was not exposing any bug so far,
but it would with the new code, for example when a bridge is allocated and
then freed without calling drm_bridge_add(), which is common on probe
errors.

drm_bridge_add() needs special care for bridges being added after having
been previously added and then removed.  This happens for example for many
non-DCS DSI host bridge drivers like samsung-dsim which
drm_bridge_add/remove() themselves every time the DSI device does a DSI
attaches/detach. When the DSI device is hot-pluggable this happens multiple
times in the lifetime of the DSI host bridge.  On every attach after the
first one, drm_bridge_add() finds bridge->list in the removed list, not at
the initialized state as drm_bridge_add() currently expects. Add a
list_del_init() to remove the bridge from the lingering list and bring
bridge->list back to the initialized state.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250915-drm-bridge-debugfs-removed-v9-1-6e5c0aff5de9@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2025-09-23 22:20:05 +02:00
Arnd Bergmann
17752efeca Allwinner Device Tree changes for 6.18
This tag contains two DT binding header changes that are shared with
 the clk tree.
 
 In this cycle we gained support for the MCU PRCM clock and reset
 controller on the A523/A527/T527 family of SoCs, the NPU which is a
 Vivante GC9000 IP block, and the NPU clock that was missing. The other
 PRCM clock controller gained default bus clock rate settings. These
 were not configured in the upstream U-boot bootloader, leading to them
 running at slower rates. The assigned rates are from the user manual.
 
 There is also a new board, the NetCube Systems Nagami SoM and two of
 its carrier boards.
 
 The A523 family development boards now have their internal RTC clocks
 configured correctly, so that the RTC does not drift wildly. The missing
 functions for the AXP717 on these boards are added. Missing reset GPIOs
 and delays for Ethernet PHYs are added. Last, the Cubie A5E now has its
 LEDs described and usable.
 
 An overlay for the Orange Pi Zero interface (addon) board was added.
 This can be used with the Orange Pi Zero and Zero Plus 2. Default audio
 routing for these two boards (to be used with the addon) were added to
 complement the overlay.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCgAsFiEE2nN1m/hhnkhOWjtHOJpUIZwPJDAFAmjK7T8OHHdlbnNAY3Np
 ZS5vcmcACgkQOJpUIZwPJDAs/A//dN+3oLNSH1Ua72LdQgOBdmW9V5NmTXQNZUob
 pKrWnLN5ouZ8bID6o7uQWPngDWGSD0YnDTnsvWWNKS+HPk+JHFDClE1L3+/hLqsQ
 aXYMr0YdwS0HaiIm3/wCvIH45CIUgPTWnX6uVE9yxsJ8ERwEhO2n08oAcl5wB+x8
 ry43T62Xf2u5RpIoxPfKvilMWXewg09LFOzBw9Bp/O0jE5sBYUEDzne5KTtCDg6y
 /g7n3oD5025v5F6xRWE4NkAXQavayNjPLehXjwxg+WX4OcitRXO3JW3CEv3OvOpQ
 selj3ueY/PEH6DJxRCHYZeIE63bwH1sMLl6Qj/IWnajO1dHNhADCvCswCGtBU/R+
 bJJBaCbjqwYfJ1/8L3Sv6/zwqptl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a7qc/xnPokulFujr7P
 OEJe4MG16AXCiE4F5jL0DkoWIdSLB+6LJW81UDJ3Z+tb6sp4VoY=
 =7iP3
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt

Allwinner Device Tree changes for 6.18

This tag contains two DT binding header changes that are shared with
the clk tree.

In this cycle we gained support for the MCU PRCM clock and reset
controller on the A523/A527/T527 family of SoCs, the NPU which is a
Vivante GC9000 IP block, and the NPU clock that was missing. The other
PRCM clock controller gained default bus clock rate settings. These
were not configured in the upstream U-boot bootloader, leading to them
running at slower rates. The assigned rates are from the user manual.

There is also a new board, the NetCube Systems Nagami SoM and two of
its carrier boards.

The A523 family development boards now have their internal RTC clocks
configured correctly, so that the RTC does not drift wildly. The missing
functions for the AXP717 on these boards are added. Missing reset GPIOs
and delays for Ethernet PHYs are added. Last, the Cubie A5E now has its
LEDs described and usable.

An overlay for the Orange Pi Zero interface (addon) board was added.
This can be used with the Orange Pi Zero and Zero Plus 2. Default audio
routing for these two boards (to be used with the addon) were added to
complement the overlay.

* tag 'sunxi-dt-for-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: sun55i: Complete AXP717A sub-functions
  arm64: dts: allwinner: t527: orangepi-4a: hook up external 32k crystal
  arm64: dts: allwinner: t527: avaota-a1: hook up external 32k crystal
  arm64: dts: allwinner: a527: cubie-a5e: Drop external 32.768 KHz crystal
  arm64: dts: sun55i: a523: Assign standard clock rates to PRCM bus clocks
  ARM: dts: sunxi: add support for NetCube Systems Nagami Keypad Carrier
  ARM: dts: sunxi: add support for NetCube Systems Nagami Basic Carrier
  ARM: dts: sunxi: add support for NetCube Systems Nagami SoM
  riscv: dts: allwinner: d1s-t113: Add pinctrl's required by NetCube Systems Nagami SoM
  dt-bindings: arm: sunxi: Add NetCube Systems Nagami SoM and carrier board bindings
  ARM: dts: allwinner: Add Orange Pi Zero Interface Board overlay
  ARM: dts: allwinner: orangepi-zero-plus2: Add default audio routing
  ARM: dts: allwinner: orangepi-zero: Add default audio routing
  arm64: dts: allwinner: a523: Add NPU device node
  arm64: dts: allwinner: a523: Add MCU PRCM CCU node
  dt-bindings: clock: sun55i-a523-ccu: Add A523 MCU CCU clock controller
  dt-bindings: clock: sun55i-a523-ccu: Add missing NPU module clock
  arm64: dts: allwinner: t527: avaota-a1: Add ethernet PHY reset setting
  arm64: dts: allwinner: a527: cubie-a5e: Add ethernet PHY reset setting
  arm64: dts: allwinner: a527: cubie-a5e: Add LEDs

Link: https://lore.kernel.org/r/aMrtuZg8HlR--TAt@wens.tw
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 22:17:56 +02:00
Arnd Bergmann
83ae575d6f mt8188:
- change efuse compatible fallback to make GPU DVFS work
 - enable SCP core for video decoding and encoding
 
 mt8186:
 - add correct touchscreen compatible for tentacruel and krabby
 
 Fixes of DT warnings for many different SoCs and boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmjKifAbFIAAAAAABAAO
 bWFudTIsMi41KzEuMTEsMiwyAAoJEC9tfk32wqh+7b8P/1sz0AKcxiPNzOGee4C6
 h2illlY1DKSpiDmA57BEMRSAs204X298ZFNLTLlc4wFMgHuhGLcdEyM+8G5n67yX
 of5t2TOhEgczcZQICWW2F1uvxvfMYIGKPge1M7tRVnJ4rWY45hzu3PYmIcxXTwvG
 C3T3ORLVl2Q2kUcwpzqpJtGw5Bx/N9DyOK3Ii87G9ifwMXN0ZbaKBPWb1dVfa5RD
 PTkvpUVtvFk8Ed8bdg8b8U3p7Yzz4fiDOEd31s4m43HYVWtctPWaa5BC7JKzuggu
 bMzAD/x3m7JHMwtFyz14IQLzohHGvrl8loTDxrjypsQ1BX4/lM6BYKXMdM/ls/SY
 XBTvZtC6t40GYiB0OmuqhYorKOiqzGrvnOgLlqeXor8To5L6QV/4jqugm3jL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DgKgjIbc
 HyXKLv5DUuDMUlxc+iVSlRDEce7BskY+EPaupoDugdFOpGFw014=
 =2bB0
 -----END PGP SIGNATURE-----

Merge tag 'v6.17-next-dts64.2' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt

mt8188:
- change efuse compatible fallback to make GPU DVFS work
- enable SCP core for video decoding and encoding

mt8186:
- add correct touchscreen compatible for tentacruel and krabby

Fixes of DT warnings for many different SoCs and boards.

* tag 'v6.17-next-dts64.2' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: (24 commits)
  arm64: dts: mediatek: mt8516-pumpkin: Fix machine compatible
  arm64: dts: mediatek: mt8395-kontron-i1200: Fix MT6360 regulator nodes
  arm64: dts: mediatek: mt8195-cherry: Add missing regulators to rt5682
  arm64: dts: mediatek: mt8195-cherry: Move VBAT-supply to Tomato R1/R2
  arm64: dts: mediatek: mt8195: Fix ranges for jpeg enc/decoder nodes
  arm64: dts: mediatek: mt8183-kukui: Move DSI panel node to machine dtsis
  arm64: dts: mediatek: mt8183: Migrate to display controller OF graph
  arm64: dts: mediatek: mt8183-pumpkin: Add power supply for CCI
  arm64: dts: mediatek: pumpkin-common: Fix pinctrl node names
  arm64: dts: mediatek: mt8183: Fix pinctrl node names
  arm64: dts: mediatek: acelink-ew-7886cax: Remove unnecessary cells in spi-nand
  arm64: dts: mediatek: mt7986a-bpi-r3: Set interrupt-parent to mdio switch
  arm64: dts: mediatek: mt7986a-bpi-r3: Fix SFP I2C node names
  arm64: dts: mediatek: mt7986a: Fix PCI-Express T-PHY node address
  arm64: dts: mediatek: Fix node name for SYSIRQ controller on all SoCs
  arm64: dts: mediatek: mt6795-sony-xperia-m5: Add pinctrl for mmc1/mmc2
  arm64: dts: mediatek: mt6795-xperia-m5: Fix mmc0 latch-ck value
  arm64: dts: mediatek: mt6795: Add mediatek,infracfg to iommu node
  arm64: dts: mediatek: mt6797: Remove bogus id property in i2c nodes
  arm64: dts: mediatek: mt6797: Fix pinctrl node names
  ...

Link: https://lore.kernel.org/r/c0e2e902-2a10-44a7-9592-491ba7382df0@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 22:15:57 +02:00
Arnd Bergmann
0651061855 RISC-V Devicetrees for v6.18
Sophgo:
 
 Minor changes here only for SG2042. Enable numa
 and we can see significant performance improvements,
 for example in the STREAM test.
 
 Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEdoBX2jyDC9ZCTwZjDCzASqG0i0IFAmjKa6YACgkQDCzASqG0
 i0JqeQwAgknIaAet2WndrfaHmjfF3l6utvI/bJS+irq2rrzBpIsVcDmmejhqmawd
 7Kd2zvsCpYzmyCUKWgx0fyj4mVBvgJcUeYb+Cd92qPeuXw0TVKzBPausFZALHIz6
 HIQMe8W18oWBps+wbucIpEDbM5/cNB49gC8fNXB0OrwVAAfJuuORPqkbZMUGwPbg
 1XAjEUQW/PMPol/kiYOCcv3AaUjlFJxSy5wX3endc+2T/f5eNIU46JI/GH51DpLy
 UsJJlDq1mneuqL3Nsb//KTh5LpECmQAcxJnbqXz2myk0EKI84LYIJHet3V+zoeme
 eHxqszSSl69W/Bu8GSdW/ZR4ABNpibocv71PMg4PesUclWQgru06GG2up+wE3RPv
 xbSrTm/7f7W7ZG6p1jZ4sRWLX0gwOOXGEasW5xYkXbijY2TjC5Ai22RINidDYnvb
 XXPQcVEidIzh7zkVfJ39N+5WfuN9oLnLC7mz6RMqVcYa+Rim+SPEd/vAwuIe0f4M
 BVRpZ8qj
 =4hzm
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmjS/9QACgkQmmx57+YA
 GNmGbhAAmezDnPUHibicM55+7lZss+lftZ7gfE5dwp4ty+9q+zHmm7NfUwfsEeSV
 OJUCky26UTPQV0xqyxGguxaio9IJDa4vTu+doB09LQxIu44QvmpPAA8Cc86MRTbh
 js84bSfg2ljGTIY7I9JeB3ko0Ftr4sUvd79O0Cqux076UX56c0t2BBkkbLvLor99
 KkCVZgpv2nDaIVfVPhugZFNaqacoLPlX8Gze2GO5hCKKwM3nkfEtv9aXjgHLjqCY
 HXwvQCqKwNytKNPZugCesAZXIwb/g+9xDDK5rrprMB3f/nT+7wTk+IEbENIEVx5N
 TnIZtR+X1Trrl7GMjMng9uYjlYrNgjQxrVxqz1PwimKZtKHXhX4rLe/tz/IxDQaT
 IBCwebacLxqYOx9fmeUQ1hVMZsI9CSY9CTbYJySwhLvzWsOF/oLc9Gi8VHUyagwf
 qQFNyj4YBaJB5Fmlup13dTBpqeiZEOAFFDIYfyXB/TS8SjcszSTMk4Tk03I8PMXc
 hEqP85RMqETGQmeAJw8teaxPTxUQh9ebkmlQfLxutdNYgn83a8Ikz6PmkFFNMwOA
 KfDCvwChE7iTwgysQYNIeYQyRh1SAfwrfc5QYGXdCsFkCEU88rCP06dX50xdIBKx
 ZnMxbRZqnKzTY5z58qcl7ZPSP+IR8rv83eiK0P75BiV0lJqKkjE=
 =RXxa
 -----END PGP SIGNATURE-----

Merge tag 'riscv-sophgo-dt-for-v6.18' of https://github.com/sophgo/linux into soc/dt

RISC-V Devicetrees for v6.18

Sophgo:

Minor changes here only for SG2042. Enable numa
and we can see significant performance improvements,
for example in the STREAM test.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>

* tag 'riscv-sophgo-dt-for-v6.18' of https://github.com/sophgo/linux:
  dts: sophgo: sg2042: added numa id description

Link: https://lore.kernel.org/r/MAUPR01MB11072ABA02A18CC7AA9B88874FE17A@MAUPR01MB11072.INDPRD01.PROD.OUTLOOK.COM
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 22:15:16 +02:00
Arnd Bergmann
21a98498ae Keystone2 device tree updates for v6.18
Cosmetic cleanups:
 * dt-bindings: Convert ti,keystone to DT schema
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBA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sDVJ2A1UY
 IkR88SSbyvX9NOavFt3L1vXFOwBW97/uDemp5jIFYHEUSbtTMcImhfnSy4USCHqH
 I7kza7dMEDyG52oeAZxbah/jq84ePcoyy8H/DBU/iyTAza4UfKU+SsMPdgPZoHZx
 DzE4PXjxD5lnPOFT/cefCmCAE7X6u8FbQ2qLBMyGvLhiIgOmfAI+VDbpBcqsi7eK
 UelnmCOhbXG8zByGYAaFZd8J154ffJbrTgnqztZ9G8jGQkUEx2dtLtySzOI48yf4
 mnu+NXHrKVYa9hNHgPCmDLf5lV3zvPnBWDLiAw9vX25mYPSisSlteV7a1N5rWFcE
 D9P6JyG0kCXiO9MHABcXJH/vjPcztFQTEenwWR8WFWZXgE/VRHVKPXPjTSN9dgT4
 VRrcWk6v3b2XS1aQmuVl4P2QIZNZ350Crt8PzMIkhsO1XLcU2l078RGcWvRxI9le
 rm7BPCGmi7iq/s0i9ZaUCUKOy3iJNugzd1281IrWzASEvtJnTMk=
 =OioY
 -----END PGP SIGNATURE-----

Merge tag 'ti-keystone-dt-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt

Keystone2 device tree updates for v6.18

Cosmetic cleanups:
* dt-bindings: Convert ti,keystone to DT schema

* tag 'ti-keystone-dt-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  dt-bindings: arm: Convert ti,keystone to DT schema

Link: https://lore.kernel.org/r/20250916175415.o2zvkxsbiqdk5i7q@almost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 22:14:10 +02:00
Arnd Bergmann
57cff2159b TI K3 device tree updates for v6.18
Generic fixes and cleanups:
 * k3-pinctrl: Fix incorrect macro usage, add missing DeepSleep/drive strength
   macros
 * k3: Rename rproc reserved-mem nodes to 'memory@addr' and add labels for
   reserved-memory
 * Long time pending major remoteproc firmware refactoring to allow flexibility
   for downstream variants:
   - am62x/am62ax: Move Mailbox/Remoteproc nodes to board-level DTS files
   - am64/am65/j721e/j721s2/j784s4/j742s2/j7200: Move Remoteproc enablement to
     board-level DTS
   - am62a/am62/am62p/j722s: Similarly restructure Mailbox/Remoteproc configs
   - am65/am64: Refactor IPC firmware carveouts/mailboxes into new SoC
     family-specific dtsi files
   - j721e/j721s2/j784s4/j742s2/am62/am62p/am62a/am64/am65/j7200/j722s: Refactor
     IPC firmware configs into new board-independent dtsi files
   - Various boards: Add missing or corrected carveouts/timers/mailbox configs
     for IPC firmware alignment
 * Multiple-boards: Bootph-all property added for USB PHYs to support DFU boot.
 
 New Boards/SoM/SiP:
 * Variscite VAR-SOM-AM62P SoM and carrier boards
 * AM6254atl SiP package and SK
 
 SoC specific changes:
 AM62P:
 * Update eMMC HS400 STRB tuning value
 * Split HS400 support away from J722S due to errata
 * Add Variscite VAR-SOM-AM62P SoM and Symphony carrier board support
 
 AM62:
 * Remove unused DeepSleep USB1 pin config on SK
 * Add CSI2 interrupts property on main CSI2RX
 * Enable Mailbox & Remoteproc at board level
 * PocketBeagle2 + Verdin variants: Add missing IPC firmware carveouts, enable
   R5F/M4F
 
 AM62A:
 * Fix padcfg length in pad configuration registers
 * Remove unused DeepSleep USB1 pin config on SK
 * Add CSI2 interrupts property
 * Add 1.4GHz OPP entry for phyCORE-AM62Ax
 * Enable Mailbox & Remoteproc at board level
 * Add missing IPC firmware carveouts for PocketBeagle2 and other boards
 
 AM62D2:
 * Add Octal SPI NOR flash (OSPI) support for EVM
 * Enable USB0/USB1 interface on EVM
 
 AM625:
 * Introduce AM6254atl SiP base SoC support
 * Add SK-AM6254atl board
 
 AM64:
 * Refactor IPC firmware configs into new dtsi
 * Enable Remoteproc at board level
 * Add PA stats property for PEB-C-010 expansion Ethernet card
 * phyCORE SoM + SR SoM/Electra board: Add missing IPC firmware configs
 
 AM65:
 * Refactor IPC firmware configs into new dtsi
 * Enable Remoteproc at board level
 
 AM69:
 * Switch SERDES0 config to PCIe Multilink + USB mode, enabling independent
   PCIe1 & PCIe3 link speeds
 
 J7200:
 * Refactor IPC firmware configs into new dtsi
 * Enable R5F Remoteproc at board level
 
 J721E:
 * Add DSI + DPHY-TX nodes
 * Add CSI2 interrupts property
 * BeagleBone AI64: Switch R5 clusters to split mode, add timer reserves for
   IPC FW, Correct carveouts (revert mistaken reordering of C6x carveouts)
 * Refactor IPC firmware configs into new dtsi
 * Enable Remoteproc at board level
 
 J721S2:
 * Add DSI + DSI PHY nodes
 * Add USB0 Type-A overlay for EVM
 * Add CSI2 interrupts property
 * Ensure PCIe node has proper interrupt-controller #address-cells
   fixes dtbs_check warning.
 * Refactor IPC firmware configs into new dtsi
 * Enable Remoteproc at board level
 * Common processor board: Add DisplayPort-1 enable, I2C4 instance for
   display connector
 
 J722S:
 * Add bootph-all to usb0_phy_ctrl node (DFU)
 * Add JPEG Encoder node (E5010)
 * Add CSI2 interrupts properties on main/J722S/AM62P common main
 * Refactor IPC firmware configs into new dtsi
 * Enable Remoteproc at board level
 
 J784S4/J742S2:
 * Add CSI2 interrupts properties on main-common
 * Add DSI & PHY support
 * Enable DisplayPort-1 on EVM
 * Refactor IPC firmware configs into new dtsi (common & SoC-specific)
 * Enable Remoteproc at board level
 * J742S2: Override MCU R5 firmware names in dedicated dtsi
 
 Board specific changes:
 AM62P Variscite Symphony Board:
 * Add support with USB, Eth, Camera, CAN, GPIO expander
 
 AM642-phyBOARD-Electra
 * Add PEB-C-010 Ethernet expansion board overlay
 * Add PA stats handle
 
 AM642-sr/phyCORE
 * Add missing IPC carveouts for R5F/M4F
 
 AM62-Verdin/AM62P-Verdin
 * Add missing IPC carveouts for R5F/M4F, mailboxes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmjJnrIACgkQ3bWEnRc2
 JJ3Drw/9GLnh6c2rJq+68AYy28cnTgUzcgo17ZXDfLl4Z2UTSj1/rVqLzxM9vgwu
 QfYgqh+97IvftMWHpB/r6Xv1giJf5VTZHHhcTcsW6vzlnFj3diD4viXuhLKwYXW5
 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knYgs/8+xAcIl2BWGalJzygmbxG4wh18
 LgpymsEGfuR57gU1bwgSQhMtWiDtpdYCJCSbGMFGy7wgGgB+kEkXVvCbZzRfpf25
 Xub5aYJhm4UrerKOY3Eu4LHJC8YnHZWOCXKFlT1FiLE3wq6A4L2h+1nXnFYG/6eQ
 drZ8rXz7/tIQEI0rKtBQB2OqLcmry0ZV4k3ITGqJajRM2YHrtIq2p/oForKH21Zu
 ea3HU3Sz8vPaNWVepaLA2JYZPMCGGroa/PjRcfA7h/bYHr1uqZInkSA+rERDy+yA
 12LjEBD4CFP89iYnTeRLy5PoK6LvnCKfMcld/JUfIRG5evy6eLI=
 =I8qt
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-dt-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt

TI K3 device tree updates for v6.18

Generic fixes and cleanups:
* k3-pinctrl: Fix incorrect macro usage, add missing DeepSleep/drive strength
  macros
* k3: Rename rproc reserved-mem nodes to 'memory@addr' and add labels for
  reserved-memory
* Long time pending major remoteproc firmware refactoring to allow flexibility
  for downstream variants:
  - am62x/am62ax: Move Mailbox/Remoteproc nodes to board-level DTS files
  - am64/am65/j721e/j721s2/j784s4/j742s2/j7200: Move Remoteproc enablement to
    board-level DTS
  - am62a/am62/am62p/j722s: Similarly restructure Mailbox/Remoteproc configs
  - am65/am64: Refactor IPC firmware carveouts/mailboxes into new SoC
    family-specific dtsi files
  - j721e/j721s2/j784s4/j742s2/am62/am62p/am62a/am64/am65/j7200/j722s: Refactor
    IPC firmware configs into new board-independent dtsi files
  - Various boards: Add missing or corrected carveouts/timers/mailbox configs
    for IPC firmware alignment
* Multiple-boards: Bootph-all property added for USB PHYs to support DFU boot.

New Boards/SoM/SiP:
* Variscite VAR-SOM-AM62P SoM and carrier boards
* AM6254atl SiP package and SK

SoC specific changes:
AM62P:
* Update eMMC HS400 STRB tuning value
* Split HS400 support away from J722S due to errata
* Add Variscite VAR-SOM-AM62P SoM and Symphony carrier board support

AM62:
* Remove unused DeepSleep USB1 pin config on SK
* Add CSI2 interrupts property on main CSI2RX
* Enable Mailbox & Remoteproc at board level
* PocketBeagle2 + Verdin variants: Add missing IPC firmware carveouts, enable
  R5F/M4F

AM62A:
* Fix padcfg length in pad configuration registers
* Remove unused DeepSleep USB1 pin config on SK
* Add CSI2 interrupts property
* Add 1.4GHz OPP entry for phyCORE-AM62Ax
* Enable Mailbox & Remoteproc at board level
* Add missing IPC firmware carveouts for PocketBeagle2 and other boards

AM62D2:
* Add Octal SPI NOR flash (OSPI) support for EVM
* Enable USB0/USB1 interface on EVM

AM625:
* Introduce AM6254atl SiP base SoC support
* Add SK-AM6254atl board

AM64:
* Refactor IPC firmware configs into new dtsi
* Enable Remoteproc at board level
* Add PA stats property for PEB-C-010 expansion Ethernet card
* phyCORE SoM + SR SoM/Electra board: Add missing IPC firmware configs

AM65:
* Refactor IPC firmware configs into new dtsi
* Enable Remoteproc at board level

AM69:
* Switch SERDES0 config to PCIe Multilink + USB mode, enabling independent
  PCIe1 & PCIe3 link speeds

J7200:
* Refactor IPC firmware configs into new dtsi
* Enable R5F Remoteproc at board level

J721E:
* Add DSI + DPHY-TX nodes
* Add CSI2 interrupts property
* BeagleBone AI64: Switch R5 clusters to split mode, add timer reserves for
  IPC FW, Correct carveouts (revert mistaken reordering of C6x carveouts)
* Refactor IPC firmware configs into new dtsi
* Enable Remoteproc at board level

J721S2:
* Add DSI + DSI PHY nodes
* Add USB0 Type-A overlay for EVM
* Add CSI2 interrupts property
* Ensure PCIe node has proper interrupt-controller #address-cells
  fixes dtbs_check warning.
* Refactor IPC firmware configs into new dtsi
* Enable Remoteproc at board level
* Common processor board: Add DisplayPort-1 enable, I2C4 instance for
  display connector

J722S:
* Add bootph-all to usb0_phy_ctrl node (DFU)
* Add JPEG Encoder node (E5010)
* Add CSI2 interrupts properties on main/J722S/AM62P common main
* Refactor IPC firmware configs into new dtsi
* Enable Remoteproc at board level

J784S4/J742S2:
* Add CSI2 interrupts properties on main-common
* Add DSI & PHY support
* Enable DisplayPort-1 on EVM
* Refactor IPC firmware configs into new dtsi (common & SoC-specific)
* Enable Remoteproc at board level
* J742S2: Override MCU R5 firmware names in dedicated dtsi

Board specific changes:
AM62P Variscite Symphony Board:
* Add support with USB, Eth, Camera, CAN, GPIO expander

AM642-phyBOARD-Electra
* Add PEB-C-010 Ethernet expansion board overlay
* Add PA stats handle

AM642-sr/phyCORE
* Add missing IPC carveouts for R5F/M4F

AM62-Verdin/AM62P-Verdin
* Add missing IPC carveouts for R5F/M4F, mailboxes

* tag 'ti-k3-dt-for-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (78 commits)
  arm64: dts: ti: k3-j721s2-evm: Add overlay to enable USB0 Type-A
  arm64: dts: ti: k3-am642-phyboard-electra: Add PEB-C-010 Overlay
  arm64: dts: ti: var-som-am62p: Add support for Variscite Symphony Board
  arm64: dts: ti: Add support for Variscite VAR-SOM-AM62P
  dt-bindings: arm: ti: Add bindings for Variscite VAR-SOM-AM62P
  arm64: dts: ti: k3-j722s-evm: Add bootph-all tag to usb0_phy_ctrl node
  arm64: dts: ti: k3-am62x-sk-common: Add bootph-all tag to usb0_phy_ctrl node
  arm64: dts: ti: k3-am62p5-sk: Add bootph-all tag to usb0_phy_ctrl node
  arm64: dts: ti: k3-am62a7-sk: Add bootph-all tag to usb0_phy_ctrl node
  arm64: dts: ti: k3-j721e-main: Add DSI and DPHY-TX
  arm64: dts: ti: k3-pinctrl: Fix the bug in existing macros
  arm64: dts: ti: k3-pinctrl: Add the remaining macros
  arm64: dts: ti: k3-am62x-sk-common: Remove the unused cfg in USB1_DRVVBUS
  arm64: dts: ti: k3-am62p5-sk: Remove the unused cfg in USB1_DRVVBUS
  arm64: dts: ti: k3-am62d2-evm: Add support for OSPI flash
  arm64: dts: ti: k3-am62d2-evm: Enable USB support
  arm64: dts: ti: k3-am62a-main: Fix main padcfg length
  arm64: dts: ti: k3-am62p: Update eMMC HS400 STRB value
  arm64: dts: ti: k3-am62p/j722s: Remove HS400 support from common
  arm64: dts: ti: Add support for AM6254atl SiP SK
  ...

Link: https://lore.kernel.org/r/20250916175349.pxg6gxd4vg5vfmhx@overvalue
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-09-23 22:11:51 +02:00
Krzysztof Kozlowski
958e55f90a dt-bindings: i2c: spacemit,k1-i2c: Minor whitespace cleanup in example
The DTS code coding style expects exactly one space around '='
character.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Troy Mitchell <troymitchell988@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2025-09-23 21:52:11 +02:00
Ivaylo Ivanov
8ab3bd59f9 dt-bindings: i2c: exynos5: add samsung,exynos8890-hsi2c compatible
Add samsung,exynos8890-hsi2c compatible, reusing the 8895 support
since it's compatible with exynos8890's i2c controllers.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2025-09-23 21:48:09 +02:00
Alexei Starovoitov
8b52d09a1d Merge branch 'riscv-bpf-fix-uninitialized-symbol-retval_off'
Chenghao Duan says:

====================
riscv: bpf: Fix uninitialized symbol 'retval_off'

v2:
Adjust the commit log

URL for version v1:
https://lore.kernel.org/all/20250820062520.846720-1-duanchenghao@kylinos.cn/
====================

Link: https://patch.msgid.link/20250922062244.822937-1-duanchenghao@kylinos.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:29:04 -07:00
Chenghao Duan
d0bf7cd5df riscv: bpf: Fix uninitialized symbol 'retval_off'
In the __arch_prepare_bpf_trampoline() function, retval_off is only
meaningful when save_ret is true, so the current logic is correct.
However, in the original logic, retval_off is only initialized under
certain conditions; for example, in the fmod_ret logic, the compiler is
not aware that the flags of the fmod_ret program (prog) have set
BPF_TRAMP_F_CALL_ORIG, which results in an uninitialized symbol
compilation warning.

So initialize retval_off unconditionally to fix it.

Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20250922062244.822937-2-duanchenghao@kylinos.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:29:03 -07:00
Quentin Monnet
0d3bf643b4 bpftool: Add bash completion for program signing options
Commit 40863f4d6e ("bpftool: Add support for signing BPF programs")
added new options for "bpftool prog load" and "bpftool gen skeleton".
This commit brings the relevant update to the bash completion file.

We rework slightly the processing of options to make completion more
resilient for options that take an argument.

Signed-off-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/r/20250923103802.57695-1-qmo@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:28:33 -07:00
Yixun Lan
8d13f91d7f dt-bindings: i2c: spacemit: extend and validate all properties
Extend the K1 I2C properties by including generic i2c-controller schema.
and this will enable it to do the DT validation check later.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Tested-by: Alex Elder <elder@riscstar.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2025-09-23 21:16:48 +02:00
Claudiu Beznea
dde9a38195 i2c: riic: Allow setting frequencies lower than 50KHz
The MR1.CKS field is 3 bits wide and all the possible values (from 0 to
7) are valid. This is true for all the SoCs currently integrated in
upstream Linux. Take into account CKS=7 which allows setting bus
frequencies lower than 50KHz. This may be useful at least for debugging.

Fixes: d982d66514 ("i2c: riic: remove clock and frequency restrictions")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2025-09-23 21:14:53 +02:00
Tejun Heo
ebfd5226ec sched_ext: Merge branch 'for-6.17-fixes' into for-6.18
Pull sched_ext/for-6.17-fixes to receive:

 55ed11b181 ("sched_ext: idle: Handle migration-disabled tasks in BPF code")

which conflicts with the following commit in for-6.18:

 2407bae23d ("sched_ext: Add the @sch parameter to ext_idle helpers")

The conflict is a simple context conflict which can be resolved by taking
the updated parts from both commits.

Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:10:20 -10:00
Jarkko Nikula
2f6aa0acdc MAINTAINERS: Remove myself as Synopsys DesignWare I2C maintainer
My address is going to bounce soon and I won't have access to the
Synopsys datasheets so I'm going step down being a maintainer for this
driver.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2025-09-23 21:09:04 +02:00
Alexei Starovoitov
f0b5c1490a Merge branch 'bpf-allow-union-argument-in-trampoline-based-programs'
Leon Hwang says:

====================
bpf: Allow union argument in trampoline based programs

While tracing 'release_pages' with bpfsnoop[0], the verifier reports:

The function release_pages arg0 type UNION is unsupported.

However, it should be acceptable to trace functions that have 'union'
arguments.

This patch set enables such support in the verifier by allowing 'union'
as a valid argument type.

Changes:
v3 -> v4:
* Address comments from Alexei:
  * Trim bpftrace output in patch #1 log.
  * Drop the referenced commit info and the test output in patch #2 log.

v2 -> v3:
* Address comments from Alexei:
  * Reuse the existing flag BTF_FMODEL_STRUCT_ARG.
  * Update the comment of the flag BTF_FMODEL_STRUCT_ARG.

v1 -> v2:
* Add 16B 'union' argument support in x86_64 trampoline.
* Update selftests using bpf_testmod.
* Add test case about 16-bytes 'union' argument.
* Address comments from Alexei:
  * Study the patch set about 'struct' argument support.
  * Update selftests to cover more cases.
v1: https://lore.kernel.org/bpf/20250905133226.84675-1-leon.hwang@linux.dev/

Links:
[0] https://github.com/bpfsnoop/bpfsnoop
====================

Link: https://patch.msgid.link/20250919044110.23729-1-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:07:47 -07:00
Leon Hwang
1c6686bf7f selftests/bpf: Add union argument tests using fexit programs
Add test coverage for union argument support using fexit programs:

* 8B union argument - verify that the verifier accepts it and that fexit
  programs can trace such functions.
* 16B union argument - verify that the verifier accepts it and that
  fexit programs can access the argument, which is passed using two
  registers.

Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20250919044110.23729-3-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:07:47 -07:00
Leon Hwang
ccb4f5d91e bpf: Allow union argument in trampoline based programs
Currently, functions with 'union' arguments cannot be traced with
fentry/fexit:

bpftrace -e 'fentry:release_pages { exit(); }' -v

The function release_pages arg0 type UNION is unsupported.

The type of the 'release_pages' arg0 is defined as:

typedef union {
	struct page **pages;
	struct folio **folios;
	struct encoded_page **encoded_pages;
} release_pages_arg __attribute__ ((__transparent_union__));

This patch relaxes the restriction by allowing function arguments of type
'union' to be traced in verifier.

Reviewed-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20250919044110.23729-2-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:07:46 -07:00
Wolfram Sang
6d74ed4c81 at24 updates for v6.18-rc1
- add the compatible for Giantec GT24C256C to the device-tree bindings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmjLvVUACgkQEacuoBRx
 13JqXRAAnpglQyg8G91nR5X0lOUKgZfvHTjQ4m6qfh7uRF8umUWyTZFFrVdZwkCp
 5welWnKuqyvWDkxtkySYfmVCqBDEUQdKlejwAVrmTsvMtFos5rUC6wTOX4xOm0sq
 657px97PEj4gTOTLYfiZj99XB3NDOZIdp71VNrXBffr/49ILhi4xAMXv7C8SIguu
 Wynt9oVCxQoVEZMt0UJYHd4+zGALqmf88sjt0/idVEMQX77tvtoqCbmjG5b3mha5
 CYkx+WAPRM/+qTGnQex9zKGbQ/FHmEvn9GWtDo/sG3nGIelr+9EjQlK8ZbyiVv8u
 04+6B3dQDDU/rjm5OqBBRERlAC4TjEGhh+IpQkNpFJ4ETD1WPHZ/dwrQkB6eSxpX
 ejmtitdbngDMbEnSQADBuECaSn8n2Q2BUt9xjHNTd7pG18LQSB2x7GJzWIm7yyuf
 u6mv4AUoGWxV11poUlMdPAuspQ/xndbwgjzW5jcVHpCXZrKkZBx2MDh7xRTzvHDB
 H3Tz8kC3lwkgeUslW8y9+NmA+cW0dbSkh+WoRc5rhJm+QC6wF7tQgTXG0Hb9lSmx
 2CfwmDwwubv3aN+2oLp0Pk44OrqLEA9/skIoUsXxxDU6ekqoxLsfMNR5NdhKsfxF
 ywM9kGmQMRKdr66CUsM5pme7TlMmvuY6+bjaSBF0s9LD8//0L1c=
 =je8P
 -----END PGP SIGNATURE-----

Merge tag 'at24-updates-for-v6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-mergewindow

at24 updates for v6.18-rc1

- add the compatible for Giantec GT24C256C to the device-tree bindings
2025-09-23 21:07:40 +02:00
Tejun Heo
c0008a5632 sched_ext: Misc updates around scx_sched instance pointer
In preparation for multiple scheduler support:

- Add the @sch parameter to find_global_dsq() and refill_task_slice_dfl().

- Restructure scx_allow_ttwu_queue() and make it read scx_root into $sch.

- Make RCU protection in scx_dsq_move() and scx_bpf_dsq_move_to_local()
  explicit.

v2: Add scx_root -> sch conversion in scx_allow_ttwu_queue().

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
d4f7d86666 sched_ext: Drop scx_kf_exit() and scx_kf_error()
The intention behind scx_kf_exit/error() was that when called from kfuncs,
scx_kf_exit/error() would be able to implicitly determine the scx_sched
instance being operated on and thus wouldn't need the @sch parameter passed
in explicitly. This turned out to be unnecessarily complicated to implement
and not have enough practical benefits. Replace scx_kf_exit/error() usages
with scx_exit/error() which take an explicit @sch parameter.

- Add the @sch parameter to scx_kf_allowed(), scx_kf_allowed_on_arg_tasks,
  mark_direct_dispatch() and other intermediate functions transitively.

- In callers that don't already have @sch available, grab RCU, read
  $scx_root, verify it's not NULL and use it.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
4d9553fee3 sched_ext: Add the @sch parameter to scx_dsq_insert_preamble/commit()
In preparation for multiple scheduler support, add the @sch parameter to
scx_dsq_insert_preamble/commit() and update the callers to read $scx_root
and pass it in. The passed in @sch parameter is not used yet.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
956f2b11a8 sched_ext: Drop kf_cpu_valid()
The intention behind kf_cpu_valid() was that when called from kfuncs,
kf_cpu_valid() would be able to implicitly determine the scx_sched instance
being operated on and thus wouldn't need @sch passed in explicitly. This
turned out to be unnecessarily complicated to implement and not have
justifiable practical benefits. Replace kf_cpu_valid() usages with
ops_cpu_valid() which takes explicit @sch.

Callers which don't have $sch available in the context are updated to read
$scx_root under RCU read lock, verify that it's not NULL and pass it in.

scx_bpf_cpu_rq() is restructured to use guard(rcu)() instead of explicit
rcu_read_[un]lock().

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
2407bae23d sched_ext: Add the @sch parameter to ext_idle helpers
In preparation for multiple scheduler support, add the @sch parameter to
validate_node(), check_builtin_idle_enabled() and select_cpu_from_kfunc(),
and update their callers to read $scx_root, verify that it's not NULL and
pass it in. The passed in @sch parameter is not used yet.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
fc6a93aa62 sched_ext: Add the @sch parameter to __bstr_format()
In preparation for multiple scheduler support, add the @sch parameter to
__bstr_format() and update the callers to read $scx_root, verify that it's
not NULL and pass it in. The passed in @sch parameter is not used yet.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
9fc687edf2 sched_ext: Separate out scx_kick_cpu() and add @sch to it
In preparation for multiple scheduler support, separate out scx_kick_cpu()
from scx_bpf_kick_cpu() and add the @sch parameter to it. scx_bpf_kick_cpu()
now acquires an RCU read lock, reads $scx_root, and calls scx_kick_cpu()
with it if non-NULL. The passed in @sch parameter is not used yet.

Internal uses of scx_bpf_kick_cpu() are converted to scx_kick_cpu(). Where
$sch is available, it's used. In the pick_task_scx() path where no
associated scheduler can be identified, $scx_root is used directly. Note
that $scx_root cannot be NULL in this case.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
7852e0fd1d tools/sched_ext: scx_qmap: Make debug output quieter by default
scx_qmap currently outputs verbose debug messages including cgroup operations
and CPU online/offline events by default, which can be noisy during normal
operation. While the existing -P option controls DSQ dumps and event
statistics, there's no way to suppress the other debug messages.

Split the debug output controls to make scx_qmap quieter by default. The -P
option continues to control DSQ dumps and event statistics
(print_dsqs_and_events), while a new -M option controls debug messages like
cgroup operations and CPU events (print_msgs). This allows users to run
scx_qmap with minimal output and selectively enable debug information as
needed.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
d452972858 sched_ext: Make qmap dump operation non-destructive
The qmap dump operation was destructively consuming queue entries while
displaying them. As dump can be triggered anytime, this can easily lead to
stalls. Add a temporary dump_store queue and modify the dump logic to pop
entries, display them, and then restore them back to the original queue.
This allows dump operations to be performed without affecting the
scheduler's queue state.

Note that if racing against new enqueues during dump, ordering can get
mixed up, but this is acceptable for debugging purposes.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
f3aec2adce sched_ext: Add SCX_EFLAG_INITIALIZED to indicate successful ops.init()
ops.exit() may be called even if the loading failed before ops.init()
finishes successfully. This is because ops.exit() allows rich exit info
communication. Add SCX_EFLAG_INITIALIZED flag to scx_exit_info.flags to
indicate whether ops.init() finished successfully.

This enables BPF schedulers to distinguish between exit scenarios and
handle cleanup appropriately based on initialization state.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
c7e739746d sched_ext: Use bitfields for boolean warning flags
Convert warned_zero_slice and warned_deprecated_rq in scx_sched struct to
single-bit bitfields. While this doesn't reduce struct size immediately,
it prepares for future bitfield additions.

v2: Update patch description.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
f75efc8f4c sched_ext: Fix stray scx_root usage in task_can_run_on_remote_rq()
task_can_run_on_remote_rq() takes @sch but it is using scx_root when
incrementing SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, which is inconsistent and
gets in the way of implementing multiple scheduler support. Use @sch
instead. As currently scx_root is the only possible scheduler instance, this
doesn't cause any behavior changes.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
edf005fa27 sched_ext: Improve SCX_KF_DISPATCH comment
The comment for SCX_KF_DISPATCH was incomplete and didn't explain that
ops.dispatch() may temporarily release the rq lock, allowing ENQUEUE and
SELECT_CPU operations to be nested inside DISPATCH contexts.

Update the comment to clarify this nesting behavior and provide better
context for when these operations can occur within dispatch.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:26 -10:00
Tejun Heo
c8191ee8e6 sched_ext: Use rhashtable_lookup() instead of rhashtable_lookup_fast()
The find_user_dsq() function is called from contexts that are already
under RCU read lock protection. Switch from rhashtable_lookup_fast() to
rhashtable_lookup() to avoid redundant RCU locking.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-09-23 09:03:25 -10:00
Alexei Starovoitov
2383e45f1d Merge branch 'signed-loads-from-arena'
Puranjay Mohan says:

====================
Signed loads from Arena

Changelog:

v3 -> v4:
v3: https://lore.kernel.org/all/20250915162848.54282-1-puranjay@kernel.org/
- Update bpf_jit_supports_insn() in riscv jit to reject signed arena loads (Eduard)
- Fix coding style related to braces usage in an if statement in x86 jit (Eduard)

v2 -> v3:
v2: https://lore.kernel.org/bpf/20250514175415.2045783-1-memxor@gmail.com/
- Fix encoding for the generated instructions in x86 JIT (Eduard)
  The patch in v2 was generating instructions like:
        42 63 44 20 f8     movslq -0x8(%rax,%r12), %eax
  This doesn't make sense because movslq outputs a 64-bit result, but
  the destination register here is set to eax (32-bit). The fix it to
  set the REX.W bit in the opcode, that means changing
  EMIT2(add_3mod(0x40, ...)) to EMIT2(add_3mod(0x48, ...))
- Add arm64 support
- Add selftests signed laods from arena.

v1 -> v2:
v1: https://lore.kernel.org/bpf/20250509194956.1635207-1-memxor@gmail.com
- Use bpf_jit_supports_insn. (Alexei)

Currently, signed load instructions into arena memory are unsupported.
The compiler is free to generate these, and on GCC-14 we see a
corresponding error when it happens. The hurdle in supporting them is
deciding which unused opcode to use to mark them for the JIT's own
consumption. After much thinking, it appears 0xc0 / BPF_NOSPEC can be
combined with load instructions to identify signed arena loads. Use
this to recognize and JIT them appropriately, and remove the verifier
side limitation on the program if the JIT supports them.
====================

Link: https://patch.msgid.link/20250923110157.18326-1-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:00:23 -07:00
Puranjay Mohan
f616549124 selftests: bpf: Add tests for signed loads from arena
Add tests for loading 8, 16, and 32 bits with sign extension from arena,
also verify that exception handling is working correctly and correct
assembly is being generated by the x86 and arm64 JITs.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20250923110157.18326-4-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:00:23 -07:00
Puranjay Mohan
eab2a71f3a bpf, arm64: Add support for signed arena loads
Add support for signed loads from arena which are internally converted
to loads with mode set BPF_PROBE_MEM32SX by the verifier. The
implementation is similar to BPF_PROBE_MEMSX and BPF_MEMSX but for
BPF_PROBE_MEM32SX, arena_vm_base is added to the src register to form
the address.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20250923110157.18326-3-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:00:22 -07:00
Kumar Kartikeya Dwivedi
a91ae3c893 bpf, x86: Add support for signed arena loads
Currently, signed load instructions into arena memory are unsupported.
The compiler is free to generate these, and on GCC-14 we see a
corresponding error when it happens. The hurdle in supporting them is
deciding which unused opcode to use to mark them for the JIT's own
consumption. After much thinking, it appears 0xc0 / BPF_NOSPEC can be
combined with load instructions to identify signed arena loads. Use
this to recognize and JIT them appropriately, and remove the verifier
side limitation on the program if the JIT supports them.

Co-developed-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20250923110157.18326-2-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-09-23 12:00:22 -07:00
Kuan-Wei Chiu
e3f761be5a tools/power/x86/amd_pstate_tracer: Fix python gnuplot package names
The prerequisites section listed non-existent packages
"phython-gnuplot" and "phython3-gnuplot", which may mislead users and
cause installation failures.

Update the names to the correct distribution package names
"python-gnuplot" and "python3-gnuplot", helping users avoid confusion
and saving time for those following the instructions.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
2025-09-23 13:42:20 -05:00
Michal Wajdeczko
2de80e2da7 drm/xe/tests: Fix build break on clang 16.0.6
The following error was reported when building with clang 16.0.6:

   In file included from drivers/gpu/drm/xe/xe_pci.c:1104:
>> drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer \
   element is not a compile-time constant
           graphics_ip_xelp,
           ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/tests/xe_pci.c:221:2: error: initializer \
   element is not a compile-time constant
           media_ip_xem,
           ^~~~~~~~~~~~
   2 errors generated.

Fix that by explicit re-definition of pre-GMDID IPs, as there are
not so many of them.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509192041.tQwdE4DS-lkp@intel.com/
Fixes: 5bb5258e35 ("drm/xe/tests: Add pre-GMDID IP descriptors to param generators")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250922101207.192028-1-michal.wajdeczko@intel.com
2025-09-23 20:10:44 +02:00
Michal Wajdeczko
0ab7747c2d drm/xe/debugfs: Improve .show() helper for GT-based attributes
Like we did for tile-based attributes, introduce separate show()
helper that implicitly takes an RPM reference prior to the call
to the actual print() function. This translates into some savings.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250919160430.573-3-michal.wajdeczko@intel.com
2025-09-23 20:04:15 +02:00
Michal Wajdeczko
126d33f671 drm/xe/debugfs: Make ggtt file per-tile
Due to initial lack of per-tile debugfs directories, the ggtt file
attribute was created as per-GT file. Fix that since now we have
proper per-tile directories.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250919160430.573-2-michal.wajdeczko@intel.com
2025-09-23 20:04:13 +02:00
Melissa Wen
41b1f9fcba drm/amd/display: remove output_tf_change flag
Remove this flag as the driver stopped managing it individually since
commit a4056c2a63 ("drm/amd/display: use HW hdr mult for brightness
boost"). After some back and forth it was reintroduced as a condition to
`set_output_transfer_func()` in [1]. Without direct management, this
flag only changes value when all surface update flags are set true on
UPDATE_TYPE_FULL with no output TF status meaning.

Fixes: bb622e0c00 ("drm/amd/display: program output tf when required") [1]
Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 752e6f283e)
2025-09-23 13:54:50 -04:00
Leo Li
361ee85e98 drm/amd/display: Init DCN35 clocks from pre-os HW values
[Why]
We did not initialize dc clocks with boot-time hw values during init.
This lead to incorrect clock values in dc, causing `dcn35_update_clocks`
to make incorrect updates.

[How]
Correctly initialize DC with pre-os clk values from HW.
s/dump/save/ as that accurately reflects the purpose of the functions.

Fixes: 8774029f76 ("drm/amd/display: Add DCN35 CLK_MGR")
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d43cc4ea1f)
2025-09-23 13:54:43 -04:00
Alvin Lee
1c3217dd55 drm/amd/display: Use mpc.preblend flag to indicate preblend
[Description]
Modifications in per asic capability means mpc.preblend flag should be used
to indicate preblend. Update relevant paths to use this flag.

Fixes: 3992305061 ("drm/amd/display: Clear DPP 3DLUT Cap")
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9e5d4a5e27)
Cc: stable@vger.kernel.org
2025-09-23 13:51:37 -04:00
Matthew Schwartz
44b0fed0a5 drm/amd/display: Only restore backlight after amdgpu_dm_init or dm_resume
On clients that utilize AMD_PRIVATE_COLOR properties for HDR support,
brightness sliders can include a hardware controlled portion and a
gamma-based portion. This is the case on the Steam Deck OLED when using
gamescope with Steam as a client.

When a user sets a brightness level while HDR is active, the gamma-based
portion and/or hardware portion are adjusted to achieve the desired
brightness. However, when a modeset takes place while the gamma-based
portion is in-use, restoring the hardware brightness level overrides the
user's overall brightness level and results in a mismatch between what
the slider reports and the display's current brightness.

To avoid overriding gamma-based brightness, only restore HW backlight
level after boot or resume. This ensures that the backlight level is
set correctly after the DC layer resets it while avoiding interference
with subsequent modesets.

Fixes: 7875afafba ("drm/amd/display: Fix brightness level not retained over reboot")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4551
Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a490c8d77d)
Cc: stable@vger.kernel.org
2025-09-23 13:51:20 -04:00
Zhen Ni
d41e075b07 remoteproc: pru: Fix potential NULL pointer dereference in pru_rproc_set_ctable()
pru_rproc_set_ctable() accessed rproc->priv before the IS_ERR_OR_NULL
check, which could lead to a null pointer dereference. Move the pru
assignment, ensuring we never dereference a NULL rproc pointer.

Fixes: 1028534003 ("remoteproc: pru: Add pru_rproc_set_ctable() function")
Cc: stable@vger.kernel.org
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Link: https://lore.kernel.org/r/20250923112109.1165126-1-zhen.ni@easystack.cn
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-09-23 11:49:58 -06:00
Al Viro
a890a2e339 nfs4_setup_readdir(): insufficient locking for ->d_parent->d_inode dereferencing
Theoretically it's an oopsable race, but I don't believe one can manage
to hit it on real hardware; might become doable on a KVM, but it still
won't be easy to attack.

Anyway, it's easy to deal with - since xdr_encode_hyper() is just a call of
put_unaligned_be64(), we can put that under ->d_lock and be done with that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
2025-09-23 13:29:51 -04:00
Trond Myklebust
902893e390 NFS: Enable use of the RWF_DONTCACHE flag on the NFS client
The NFS client needs to defer dropbehind until after any writes to the
folio have been persisted on the server. Since this may be a 2 step
process, use folio_end_writeback_no_dropbehind() to allow release of the
writeback flag, and then call folio_end_dropbehind() once the COMMIT is
done.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
2025-09-23 13:29:50 -04:00
Trond Myklebust
010054a530 filemap: Add a version of folio_end_writeback that ignores dropbehind
Filesystems such as NFS may need to defer dropbehind until after their
2-stage writes are done. This adds a helper
folio_end_writeback_no_dropbehind() that allows them to release the
writeback flag without immediately dropping the folio.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
2025-09-23 13:29:50 -04:00