Commit graph

1,294,499 commits

Author SHA1 Message Date
André Draszik
b93b3140e8 arm64: dts: exynos: gs101-oriole: enable USB on this board
Pixel 6 (Oriole) has a USB-C connector that can act as host or device.

The USB role is detected dynamically using a MAX77759 TCPCI controller,
but since there is no driver for the MAX77759, the role is defaulted to
peripheral, without any endpoints / ports.

This allows Oriole to be configured as a gadget, e.g. using configfs.

As PMIC regulators are not implemented yet, we rely on USB LDOs being
enabled by the bootloader. A placeholder regulator is used for now.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-usb-dts-gs101-v2-2-7c1797c9db80@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:26:01 +02:00
André Draszik
14d15fcbe0 arm64: dts: exynos: gs101: add USB & USB-phy nodes
Add the USB 3.1 Dual Role Device (DRD) controller and USB-PHY nodes for
Google Tensor GS101.

The USB 3.1 DRD controller has the following features:
* compliant with both USB device 3.1 and USB device 2.0 standards
* compliant with USB host 3.1 and USB host 2.0 standards
* supports USB device 3.1 and USB device 2.0 interfaces
* supports USB host 3.1 and USB host 2.0 interfaces
* full-speed (12 Mbps) and high-speed (480 Mbps) modes with USB device
  2.0 interface
* super-speed (5 Gbps) mode with USB device 3.1 Gen1 interface
* super-speed plus (10 Gbps) mode with USB device 3.1 Gen2 interface
* single USB port which can be used for USB 3.1 or USB 2.0
* on-chip USB PHY transceiver
* DWC3 compatible
* supports up to 16 bi-directional endpoints
* compliant with xHCI 1.1 specification

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-usb-dts-gs101-v2-1-7c1797c9db80@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:26:00 +02:00
Peter Griffin
86124c7668 arm64: dts: exynos: gs101: enable cmu-hsi2 clock controller
Enable the cmu_hsi2 clock management unit. It feeds some of
the high speed interfaces such as PCIe and UFS.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-hsi0-gs101-v3-2-f233be0a2455@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:26:00 +02:00
Bui Quang Minh
da7c622cdd s390/cio: Ensure the copied buf is NUL terminated
Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from
userspace to that buffer. Later, we use scanf on this buffer but we don't
ensure that the string is terminated inside the buffer, this can lead to
OOB read when using scanf. Fix this issue by using memdup_user_nul instead.

Fixes: a4f17cc726 ("s390/cio: add CRW inject functionality")
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20240424-fix-oob-read-v2-5-f1f1b53a10f4@gmail.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 19:21:34 +02:00
André Draszik
f9c7447479 pinctrl: samsung: support a bus clock
On some Samsung-based SoCs there are separate bus clocks / gates each
for each pinctrl instance. To be able to access each pinctrl instance's
registers, this bus clock needs to be running, otherwise register
access will hang. Google Tensor gs101 is one example for such an
implementation.

Update the driver to handle this optional bus clock:
* handle an optional bus clock from DT
* prepare it during driver probe
* enclose all relevant register accesses with a clock enable & disable

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-samsung-pinctrl-busclock-v3-2-adb8664b8a7e@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:19:30 +02:00
André Draszik
dff9f3fb6b dt-bindings: pinctrl: samsung: google,gs101-pinctrl needs a clock
The pin controller on Google Tensor gs101 requires a bus clock for
register access to work. Add it.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-samsung-pinctrl-busclock-v3-1-adb8664b8a7e@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:18:37 +02:00
Peter Griffin
093c290084 clk: samsung: gs101: add support for cmu_hsi2
CMU_HSI2 is the clock management unit used for the hsi2 block.
HSI stands for High Speed Interface and as such it generates
clocks for PCIe, UFS and MMC card.

This patch adds support for the muxes, dividers, and gates in
cmu_hsi2.

The following clocks are marked CLK_IS_CRITICAL as disabling
them results in an immediate system hang.
CLK_GOUT_HSI2_HSI2_CMU_HSI2_PCLK
CLK_GOUT_HSI2_LHM_AXI_P_HSI2_I_CLK

The following clocks are marked CLK_IGNORE_UNUSED as they are
needed for UFS to be functional.
CLK_GOUT_HSI2_SSMT_HSI2_ACLK
CLK_GOUT_HSI2_SSMT_HSI2_PCLK
CLK_GOUT_HSI2_LHS_ACEL_D_HSI2_I_CLK
CLK_GOUT_HSI2_SYSMMU_HSI2_CLK_S2
CLK_GOUT_HSI2_XIU_D_HSI2_ACLK
CLK_GOUT_HSI2_XIU_P_HSI2_ACLK

CLK_GOUT_HSI2_GPIO_HSI2_PCLK is marked CLK_IGNORE_UNUSED until
the exynos pinctrl clock patches land then it can be removed.

Some clocks in this unit have very long names. To help with this
the clock name mangling strategy was updated to include removing
the following sub-strings.
- G4X2_DWC_PCIE_CTL_
- G4X1_DWC_PCIE_CTL_
- PCIE_SUB_CTRL_
- INST_0_
- LN05LPE_
- TM_WRAPPER_
- SF_

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
[AD: resolve merge conflicts]
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-hsi0-gs101-v3-3-f233be0a2455@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:10:03 +02:00
André Draszik
1891e4d487 clk: samsung: gs101: add support for cmu_hsi0
CMU_HSI0 is the clock management unit for one of the high speed
interfaces, which is used (amongst others) for USB

Some notes about the clocks marked as CLK_IGNORE_UNUSED:
* CLK_GOUT_HSI0_PCLK
  CLK_GOUT_HSI0_LHM_AXI_P_HSI0_I_CLK
  CLK_GOUT_HSI0_XIU_P_HSI0_ACLK need to be kept running as
  otherwise the system becomes unresponsive and it doesn't complete
  booting.

* CLK_GOUT_HSI0_LHS_ACEL_D_HSI0_I_CLK
  CLK_GOUT_HSI0_SSMT_USB_ACLK
  CLK_GOUT_HSI0_SSMT_USB_PCLK
  CLK_GOUT_HSI0_SYSMMU_USB_CLK_S2
  CLK_GOUT_HSI0_XIU_D0_HSI0_ACLK
  CLK_GOUT_HSI0_XIU_D1_HSI0_ACLK are needed for USB to come up
  properly (SSMT is for (secure) memory tagging).

While at the moment we only support booting with the clk_ignore_unused
kernel command line paramenter, it's still worthwhile to explicitly
mark those clocks.

While the usual (sed) script has been used to derive the linux clock
names from the data sheet, one manual tweak was applied to fix a typo
coming from the data sheet which we don't want to carry:
    hsi0_uspdpdbg_user -> hsi0_usbdpdbg_user (note usb vs usp).

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-hsi0-gs101-v2-4-2157da8b63e3@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:09:25 +02:00
Krzysztof Kozlowski
822797560e Merge branch 'for-v6.10/clk-gs101-bindings' into next/clk 2024-04-29 19:09:18 +02:00
André Draszik
4982a4a209 arm64: dts: exynos: gs101: enable cmu-hsi0 clock controller
Enable the cmu-hsi0 clock controller. It feeds USB.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-hsi0-gs101-v2-2-2157da8b63e3@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:08:20 +02:00
Krzysztof Kozlowski
1414ca3eff Merge branch 'for-v6.10/clk-gs101-bindings' into next/dt64 2024-04-29 19:08:03 +02:00
Peter Griffin
01aea123b1 dt-bindings: clock: google,gs101-clock: add HSI2 clock management unit
Add dt schema documentation and clock IDs for the High Speed Interface
2 (HSI2) clock management unit. This CMU feeds high speed interfaces
such as PCIe and UFS.

[AD: * keep CMUs in google,gs101.h sorted alphabetically
     * resolve minor merge conflicts in google,gs101-clock.yaml
     * s/ufs_embd/ufs    s/mmc_card/mmc

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240429-hsi0-gs101-v3-1-f233be0a2455@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:06:57 +02:00
Nikita Zhandarovich
b6dd09b3da wifi: carl9170: add a proper sanity check for endpoints
Syzkaller reports [1] hitting a warning which is caused by presence
of a wrong endpoint type at the URB sumbitting stage. While there
was a check for a specific 4th endpoint, since it can switch types
between bulk and interrupt, other endpoints are trusted implicitly.
Similar warning is triggered in a couple of other syzbot issues [2].

Fix the issue by doing a comprehensive check of all endpoints
taking into account difference between high- and full-speed
configuration.

[1] Syzkaller report:
...
WARNING: CPU: 0 PID: 4721 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504
...
Call Trace:
 <TASK>
 carl9170_usb_send_rx_irq_urb+0x273/0x340 drivers/net/wireless/ath/carl9170/usb.c:504
 carl9170_usb_init_device drivers/net/wireless/ath/carl9170/usb.c:939 [inline]
 carl9170_usb_firmware_finish drivers/net/wireless/ath/carl9170/usb.c:999 [inline]
 carl9170_usb_firmware_step2+0x175/0x240 drivers/net/wireless/ath/carl9170/usb.c:1028
 request_firmware_work_func+0x130/0x240 drivers/base/firmware_loader/main.c:1107
 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289
 worker_thread+0x669/0x1090 kernel/workqueue.c:2436
 kthread+0x2e8/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

[2] Related syzkaller crashes:
Link: https://syzkaller.appspot.com/bug?extid=e394db78ae0b0032cb4d
Link: https://syzkaller.appspot.com/bug?extid=9468df99cb63a4a4c4e1

Reported-and-tested-by: syzbot+0ae4804973be759fa420@syzkaller.appspotmail.com
Fixes: a84fab3cbf ("carl9170: 802.11 rx/tx processing and usb backend")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Acked-By: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240422183355.3785-1-n.zhandarovich@fintech.ru
2024-04-29 20:06:47 +03:00
Arnd Bergmann
cc5dc7e7f9 Microchip ARM64 device tree updates for v6.10
It contains:
 - dtbs_check and dtc W=1 warning fixes
 - mdio2 and serdes address fixes for sparx5
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCZi9XfwAKCRCejrg/N2X7
 /YwsAP4jNIf3ynUDyOnrsCXxI2t1gf00Y1lzcryqWpHPl3MP2AD/d3vRYb21uSrB
 sr/lv8ec5jfZoO/1s6zCV/sRPsj4xQc=
 =5V+V
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvx3IACgkQYKtH/8kJ
 Uie6ORAAtAb5oRlXHb4Tge2Jth0ALcdJd5DWYXEfVpfoKcjN+rJqLpH6my0aKseE
 0uzQlKlVoTlry7tVf4qvK09W1ZmAvOVuXev9A9/zLvMwyYaNZuwkuxlRevJFwYMC
 eDfrJ3hX5YLJgcms5l1VRKky4ODWUKGzHNUidUv7XWGC/iP/F2K5Ao4i2yC62TSz
 tmpEgmD5iaB3vrDaSfORzKr7NP9ufT+bJ3dENBNtgia2c+YfMTvuHfK7dcQmiK9m
 8hRWXHOLSh5C64KymTIIoZTFppLXU1E/TRpJjNs7iIKmkrlfPgqBZuQm4p2MrBYH
 LsKgDB2Orpaudb/QYrmKvO9mCVuO5A6qnD3CxtslahdrDLuoMmO4A3m3VPKWxrhB
 LBzgXqcM40GmQpc2RQUj0yZuca6RArH0wlI6y0fST3J9HedHbtu2In88a+u9wm8K
 x0hGvUVAA7+Y2CZLcxjjSTtPBTndfwsG7OH/X0lk/SRagMAdXDU+YETOU/jrRfZW
 CD+6munnh7dTjUlK7LXw7f2doxRp+kE7nFyGVArxXpBjsytkwt4CsLNGrRMA217/
 dLUuERTIAdEsCRREoYkaoNQt1KCjKUX1trbDae+aOBkU4b6sQE/+MNrbmoCg9laf
 xm7x3ITL7beuvu7+pcrNM7bCtxl0nQR9+gUHySBE7JqTChK7NJM=
 =oVqS
 -----END PGP SIGNATURE-----

Merge tag 'microchip-dt64-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt

Microchip ARM64 device tree updates for v6.10

It contains:
- dtbs_check and dtc W=1 warning fixes
- mdio2 and serdes address fixes for sparx5

* tag 'microchip-dt64-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  arm64: dts: microchip: sparx5_pcb135: drop duplicated NOR flash
  arm64: dts: microchip: sparx5_pcb134: drop duplicated NOR flash
  arm64: dts: microchip: sparx5_pcb135: drop LED unit addresses
  arm64: dts: microchip: sparx5_pcb134: drop LED unit addresses
  arm64: dts: microchip: sparx5_pcb135: align I2C mux node name with bindings
  arm64: dts: microchip: sparx5_pcb134: align I2C mux node name with bindings
  arm64: dts: microchip: sparx5_pcb135: add missing I2C mux unit addresses
  arm64: dts: microchip: sparx5_pcb134: add missing I2C mux unit addresses
  arm64: dts: microchip: sparx5: correct serdes unit address
  arm64: dts: microchip: sparx5: fix mdio reg

Link: https://lore.kernel.org/r/20240429121429.1941241-1-claudiu.beznea@tuxon.dev
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 18:14:41 +02:00
Arnd Bergmann
e8325e3396 Minor improvements in ARM DTS for v6.10
1. TI: add missing white-spaces for code readability.
 2. Aspeed: add vendor prefix to compatibles, to properly describe
    hardware, even though Linux drivers match by device name.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmYud58QHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD10wOEACTZg2LEJoa54P2Ie6RpuNtcTXFWKD4NKTe
 dBqJoHKUvo7vdtnf1izPWn3LHs0vo9mll7JSTKt8jUBa56GsAFCrCrqoEmC70Tyx
 ZfvJONBT1s8Zs15GlAycUyYkBCM93KKt0S5b54vXJl3oyrGOi5OfQ0jQwdzmWOns
 jpf9PD/F7Ha2DKL1VrdEt54tkykX6kF2Rdfg7Wqbjy+qg6SyuOsJntI0qMhS8W9z
 82bI/R74z8ux3MpKfKSrht96MLDHBOhDoMQesFzOI/TIJUJNXJ8ZNh6KZKb7eTX2
 8i9MebCk2MEti8R8qvNk2KeiTybBc0n46aY/pNJIwp00ZU0oouuERXzE1koqIHfM
 BbsH/c2LbIMLPVk3VGCdEUiF67c9Elgv+sP1mUwzGgDc2os7MusCdhwE2YPSpAyW
 tQDXiTLnqhGBhT9P4kozrG25mhTQQ1E34ImQ9R9TmAopjm9z2KgaSsOYtOmaspdU
 8mUP93hw1S5yCB1za/pHTP2AehZPRBLMKpMcxRAeiF2AZYkz6w2jmcabTwFbSJlf
 zOQUe4XoUDbBao2Pb19LQ1m14rlKvFqra+58I+Vaa6qSmqv/YoYbprT/Yo5wg/Vy
 C51J59suYBHemrVFgwdkDKSVXtmQIGS7MPhfOWNLifVbnQG0QsgzdWIrhGgdEJC4
 2nhP0mBdlA==
 =IBkV
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvx0wACgkQYKtH/8kJ
 UidAJQ/9FvjPy9uBoZ87kSbjk5FnzpMZr+LCC5ul+WfeyR1qJTjWi4HLEw+FIiAF
 yT4dotKhGwkF/0JY3KyZKGk5eL8nkztO+yRDkXHUgx7sgj7ObGVsHzFP4QIpoAjB
 JNCVA+GiesgW+mMW6NqtVPlh0bhDeIBHKy3Ow442/RVOyY3i1sKSf04CKbbuntWO
 5lO684fZzBcOAdtOLyZsElbNnhxc8w3oMjnyqaUf/dGTcvXSlzWhEu9kvbvBVCa5
 HNBHSi4XlbJc2UVYHCetnQk5+nnVqutWOAUq/8WlggA5Zh/t8+8TjiLft2Alsc/K
 paIkFMnBj7+Lv72ZGSqY3YifqBzArooR9Jk+X9jPKVh2RfgiQqzRdiI+uVvvWhu+
 U+0+ndCJQf/4dcovw4Yqqhvee+iq7/jfiCY/Q8uyN2adKhz+awCCdgqmthmObTTs
 hWeg7vcVLGbIAKybymyc9p/mfYAsp4/BcL31Aq6h1zfD4Th93V1n/GvIDRFOUeNH
 bdUXlj5WGhXLrHUuaIozgO5Oyk98X5Dv9sishjE85s5d8TEYPPjG3oR+IyGCYeCH
 4R00QhMwI4vG626Ynq4KoONXe9qoHld7w/a09wm4DwfwCH+OP0vZ0u0/u5lugeVf
 XQLP1T0rsfPSlZwPRiReaSUBoEeN3lCykkSScfUnsd+O3CMmjsY=
 =cHxl
 -----END PGP SIGNATURE-----

Merge tag 'dt-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in ARM DTS for v6.10

1. TI: add missing white-spaces for code readability.
2. Aspeed: add vendor prefix to compatibles, to properly describe
   hardware, even though Linux drivers match by device name.

* tag 'dt-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt:
  ARM: dts: aspeed: Add vendor prefixes to lm25066 compat strings
  ARM: dts: ti: omap: minor whitespace cleanup

Link: https://lore.kernel.org/r/20240428163316.28955-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 18:14:04 +02:00
Arnd Bergmann
631ec37483 Minor improvements in ARM64 DTS for v6.10
Fixes, which might have practical impact, however things were broken for
 long enough to justify pushing it regular path:
 1. ARM Juno: shorten node names for thermal zones, because Linux drivers
    have strict limit of 20 characters.
 2. HiSilicon: correct size of GIC GICC address space and add missing
    GICH and GICV spaces, add cache info to properly describe cache
    topology and solve kernel boot warning.
 
 Several cleanups:
 1. Use capital "OR" for multiple licenses in SPDX.
 2. Correct white-spaces for code readability.
 3. Fix W=1 dtc compiler warnings, which should not have practical
    impact for Amazon, APM, Cavium, Realtek, Socionext Uniphier and
    Spreadtrum like:
     - missing unit addresses,
     - nodes not belonging to soc node,
     - not using generic node names,
     - few incorrect unit addresses.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmYuegkQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1wj5D/0dGKg45vt6kJeZXQ4wAfBlxzc5qw6VrIP3
 mHdpNQ4V1pS5d0x8U4dDi33TISVxsixpWrkKa5yz8FCzFRZNsXoGQd35SKRRuiSS
 cH/4K+IaY7gKGHRhowdJjfab2ddyEoa8448pk5Ne/TFEPHvhAz5ay/kr4MjtazOP
 1hc9fI0xY2Pnh8afBxsi43pwTxqoBA1QVPEzpYlb1bw3ak5ErVVVYqz7gpexA139
 MiXJlwlrcPDC/eUSJxSLR2FxgbYojXac6lmNY5Ic6cCDIhNaq5a4DqjFUYKUmXSy
 ob+K9y+81HvKDPNYao4sZLWFRyiPTXdnfCYTmRNj8Y6gVw0bfD9BaFbQHIVV/ni8
 8pkK6PnwSK2AmX4B5+ehHnrSlsrVrqbBQGpxCE7/NLWI4728wBbDvyLntizlmKRI
 oDrAEcOXGJGCEgKpoDWqWJtVPvJo5eiM59+LPW/zxdpzORArCvB+IaWs+JHBajIM
 CRCZjoE/9BiezHIgH56TzfvNYGxAqx+oTVrD/mWn2dajHFsA55LJSM/JEgSUUwXG
 Ymp1OG/vKWce7A4CnEI7gGKSincJCW3GRiIzfQSfKmeBTc1ui8itD2v5LfSdyzQ0
 eT4g00LjW0hJY3Eroc3Fg3ras5eFTf6+oAQeNqZCYQrhkxFt9Q9dMpfpLEg0n0cq
 9StXCDsosw==
 =+DRC
 -----END PGP SIGNATURE-----

Merge tag 'dt64-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in ARM64 DTS for v6.10

Fixes, which might have practical impact, however things were broken for
long enough to justify pushing it regular path:
1. ARM Juno: shorten node names for thermal zones, because Linux drivers
   have strict limit of 20 characters.
2. HiSilicon: correct size of GIC GICC address space and add missing
   GICH and GICV spaces, add cache info to properly describe cache
   topology and solve kernel boot warning.

Several cleanups:
1. Use capital "OR" for multiple licenses in SPDX.
2. Correct white-spaces for code readability.
3. Fix W=1 dtc compiler warnings, which should not have practical
   impact for Amazon, APM, Cavium, Realtek, Socionext Uniphier and
   Spreadtrum like:
    - missing unit addresses,
    - nodes not belonging to soc node,
    - not using generic node names,
    - few incorrect unit addresses.

* tag 'dt64-cleanup-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: (28 commits)
  arm64: dts: cavium: thunder2-99xx: drop redundant reg-names
  arm64: dts: amazon: alpine-v3: correct gic unit addresses
  arm64: dts: amazon: alpine-v3: drop cache nodes unit addresses
  arm64: dts: amazon: alpine-v3: add missing io-fabric unit addresses
  arm64: dts: amazon: alpine-v2: move non-MMIO node out of soc
  arm64: dts: amazon: alpine-v2: add missing io-fabric unit addresses
  arm64: dts: apm: shadowcat: move non-MMIO node out of soc
  arm64: dts: apm: storm: move non-MMIO node out of soc
  arm64: dts: cavium: correct unit addresses
  arm64: dts: cavium: move non-MMIO node out of soc
  arm64: dts: realtek: rtc16xx: add missing unit address to soc node
  arm64: dts: realtek: rtd139x: add missing unit address to soc node
  arm64: dts: realtek: rtd129x: add missing unit address to soc node
  arm64: dts: uniphier: ld20-global: drop audio codec port unit address
  arm64: dts: uniphier: ld20-global: use generic node name for audio-codec
  arm64: dts: uniphier: ld11-global: drop audio codec port unit address
  arm64: dts: uniphier: ld11-global: use generic node name for audio-codec
  arm64: dts: sharkl3: add missing unit addresses
  arm64: dts: whale2: add missing ap-apb unit address
  arm64: dts: sc9860: move GIC to soc node
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 18:12:53 +02:00
Dave Jiang
5d211c7090 cxl: Fix cxl_endpoint_get_perf_coordinate() support for RCH
Robert reported the following when booting a CXL host with Restricted CXL
Host (RCH) topology:
 [   39.815379] cxl_acpi ACPI0017:00: not a cxl_port device
 [   39.827123] WARNING: CPU: 46 PID: 1754 at drivers/cxl/core/port.c:592 to_cxl_port+0x56/0x70 [cxl_core]

... plus some related subsequent NULL pointer dereference:

 [   40.718708] BUG: kernel NULL pointer dereference, address: 00000000000002d8

The iterator to walk the PCIe path did not account for RCH topology.
However RCH does not support hotplug and the memory exported by the
Restricted CXL Device (RCD) should be covered by HMAT and therefore no
access_coordinate is needed. Add check to see if the endpoint device is
RCD and skip calculation.

Also add a call to cxl_endpoint_get_perf_coordinates() in cxl_test in order
to exercise the topology iterator. The dev_is_pci() check added is to help
with this test and should be harmless for normal operation.

Reported-by: Robert Richter <rrichter@amd.com>
Closes: https://lore.kernel.org/all/Ziv8GfSMSbvlBB0h@rric.localdomain/
Fixes: 592780b839 ("cxl: Fix retrieving of access_coordinates in PCIe path")
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Robert Richter <rrichter@amd.com>
Link: https://lore.kernel.org/r/20240426224913.1027420-1-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2024-04-29 09:03:26 -07:00
Arnd Bergmann
f71b3cf82e i.MX arm64 device tree for 6.10:
- New board support: Emcraft Systems NavQ+ Kit, Toradex Colibri iMX8DX,
   and S32G-VNP-RDB3 board.
 - A series from Alexander Stein that adds empty DSI output endpoint to
   simplify DSI connection description at board level.
 - Add pinmux and I2C GPIOs to support bus recovery for LX2160A.
 - Add cm40 subsystem description for i.MX8 SoCs.
 - A series from Frank Li that adds ADC, LPSPI and FlexSPI devices for
   imx8qm-mek board.
 - Add audio devices ASRC, ESAI, SPDIF and SAI for i.MX8QXP and correct
   audio LPCG index.
 - A couple of changes from Ghennadi Procopciuc that add SCMI firmware
   and uSDHC nodes for S32G SoC.
 - A couple of imx8mp-msc-sm2s updates from Ian Ray improving I2C pad
   drive strength and adding SDA/SCL GPIOs for I2C devices.
 - Add PCA9451A PMIC and PCF2131 RTC support for imx93-11x11-evk board.
 - A series from Lucas Stach to enable HDMI display support for i.MX8MP.
 - A series from Peng Fan to improve i.MX93 support for LPI2C, LPSPI, FEC
   and eQoS.
 - A couple of LS1028A changes from Rob Herring to improve PCI device
   description.
 - A series from Shengjiu Wang adding HDMI and PDM mic sound support for
   imx8mp-evk board.
 - A number of i.MX8M Venice device improvements from Stefan Eichenberger,
   Tim Harvey and Vitor Soares.
 - A series from Xu Yang that enables USB support for imx8ulp-evk and
   imx93-11x11-evk board.
 - Other small and random updates on various boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmYuN8MUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM6f/wgAnMgs3ufQH3CVnG3bBJ3DO14atmR9
 zbt1hBrxhsPjfwJ+e6XJEgG0HWh/q1CkLsnUECGdNXfWN7m1z/paimPNS3Gz0EaJ
 YfQcnbOqAXwoef+0yEIZQ2kmoNX2r64T5bgetUNd0JbPEjOwWnvbuGehTyNWUL5Z
 OkokSJQe+tWbEaZ2V14DzGoFJeydFEexfM/YrXx+98wt6+6cneYL9LX39OK8Kmy4
 Thlex11nXtXhmJhQ5C2MfiJsl28fpmXVEBF7IEwnJxkLr51b5XfwOSiuTZDzJLuf
 i5LcXIcckZrnoSsR6tYmUG0gmnlFQHzopLi1Jzz838edEOA/QmJf/fwdig==
 =e1vc
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvw/AACgkQYKtH/8kJ
 UiflZxAAhKLbu3Z6wEROKRiDtOgNCtgE/50oksXLjoPcnp0Xkp8mOgQesErVkCUe
 Dsyizykf7wt2fD8bZOtT/xZn3v9MIHY2lY5vO7NGAG2xjKp42LO2b9t5IRrAirhU
 eyaroUzRn2pPPSsutYSmO04VuJsajf6d3/Q9lPbPpRuCVoE8XmkADjIyWANjuo3c
 7CfDBkO22/1mKNG26SDXEbLi4+RTga+mXyq8IWu7AbHWjX50ormAaucCMVYKH4By
 Y42Mo8Y4b0MPGdN7EWF/zMYbWL/uq8cYWEAEwtH23xJZ2Rkchlk+NuKkoaosobOP
 rBwcJTiki7htej+wkRHa7c7DetC6kGtI26gaq7mziSB+JanYkqZ+ZuE0Q4nNXT3E
 0h8rlDP+CL3GSkliV/KzMmiXvQoVzFWGH2zxQpYkWijEaqZD6nLBmThVpSL8+Flk
 LmY30JH86vgiIIX19w1Jnv9v+I2Apheqd7Zt1L5AqIieQqUHbQo8GPv+7Ty7YcDp
 h5iY+XvOpPCXZ76zQ3skrXOezxMTZmbEpxzSrsRGxiURtstZwZayyeOEWiFRA3Rw
 oIhtQhqqznbTgsT3RcC9KodoJmrQVuC7dMzvMqHDxBhPh5dc2TcdcQ7zhJkq0Yn8
 5balZWgwhWnRGkvPvotciF6tMNEZs/GW4YoLFMOZK1I25nKBNA8=
 =yDAu
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt64-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt

i.MX arm64 device tree for 6.10:

- New board support: Emcraft Systems NavQ+ Kit, Toradex Colibri iMX8DX,
  and S32G-VNP-RDB3 board.
- A series from Alexander Stein that adds empty DSI output endpoint to
  simplify DSI connection description at board level.
- Add pinmux and I2C GPIOs to support bus recovery for LX2160A.
- Add cm40 subsystem description for i.MX8 SoCs.
- A series from Frank Li that adds ADC, LPSPI and FlexSPI devices for
  imx8qm-mek board.
- Add audio devices ASRC, ESAI, SPDIF and SAI for i.MX8QXP and correct
  audio LPCG index.
- A couple of changes from Ghennadi Procopciuc that add SCMI firmware
  and uSDHC nodes for S32G SoC.
- A couple of imx8mp-msc-sm2s updates from Ian Ray improving I2C pad
  drive strength and adding SDA/SCL GPIOs for I2C devices.
- Add PCA9451A PMIC and PCF2131 RTC support for imx93-11x11-evk board.
- A series from Lucas Stach to enable HDMI display support for i.MX8MP.
- A series from Peng Fan to improve i.MX93 support for LPI2C, LPSPI, FEC
  and eQoS.
- A couple of LS1028A changes from Rob Herring to improve PCI device
  description.
- A series from Shengjiu Wang adding HDMI and PDM mic sound support for
  imx8mp-evk board.
- A number of i.MX8M Venice device improvements from Stefan Eichenberger,
  Tim Harvey and Vitor Soares.
- A series from Xu Yang that enables USB support for imx8ulp-evk and
  imx93-11x11-evk board.
- Other small and random updates on various boards.

* tag 'imx-dt64-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (78 commits)
  arm64: dts: imx93-11x11-evk: add RTC PCF2131 support
  arm64: dts: imx93-11x11-evk: add reset gpios for ethernet PHYs
  arm64: dts: imx93-11x11-evk: add sleep pinctrl for sdhc2
  arm64: dts: imx93-11x11-evk: add different usdhc pinctrl for different timing usage
  arm64: dts: imx93-11x11-evk: add sleep pinctrl for eqos and fec
  arm64: dts: imx93-11x11-evk: update resource table address
  arm64: dts: imx93: add nvmem property for eqos
  arm64: dts: imx93: add nvmem property for fec1
  arm64: dts: imx93: assign usdhc[1..3] root clock to 400MHz
  arm64: dts: imx93: add dma support for lpspi[1..8]
  arm64: dts: imx93: add dma support for lpi2c[1..8]
  arm64: dts: imx93: use FSL_EDMA_RX for rx channel
  arm64: dts: freescale: ls1028a: Add standard PCI device compatible strings to ENETC
  arm64: dts: freescale: ls1028a: Fix embedded PCI interrupt mapping
  arm64: dts: imx8qxp-mek: add cm40_i2c, wm8960 and sai[0,1,4,5]
  arm64: dts: imx8mp: Align both CSI2 pixel clock
  arm64: dts: freescale: imx8m[mp]-verdin: Update audio card name
  arm64: dts: imx8mp: Enable HDMI on TQMa8MPxL/MBa8MPxL
  arm64: dts: imx8ulp: add caam jr
  arm64: dts: imx8mp-msc-sm2s: Add i2c{1,6} sda-/scl-gpios
  ...

Link: https://lore.kernel.org/r/20240428121247.10370-4-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 17:59:44 +02:00
Linus Torvalds
b947cc5bf6 Changes since last update:
- Better error message when prepare_ondemand_read failed;
 
  - Fix unmount of bdev-based mode if CONFIG_EROFS_FS_ONDEMAND is on.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEQ0A6bDUS9Y+83NPFUXZn5Zlu5qoFAmYvafURHHhpYW5nQGtl
 cm5lbC5vcmcACgkQUXZn5Zlu5qrgAg/+PK6WKc2t5SiLpG+dSLgQLhWfebJXhf3+
 IWr4hT04JcFJgmxBJAcgh7uoJFrxjTxGDX0vtiLhAAOqRCXb9rDlpqbu+PXfURa1
 YyiBAEuqnwqKCm3BixVixV8JCSLHu+UzJ72mZGw+wtSdhInXS/ddBAc8WNVbfjyU
 cUJb30+N5vjYVRYtDQG5qP0dbpstm1cTjNJIhjStcSpk9LQkQ9degYctjJj1mk8B
 ilplRIyy0bEBVbupUHPtmrHzpDZYe4QXFTtQaEGst1uDw/Cxw8I8zpwO4wavdxVz
 DZwDF6bcKGsaCFIV4UuJvowU7syEDkBHk5JvJoyNEhRuZQYOIvMdYRxl6AxAp1Jk
 vV5sn/LbWaqF7uR2Lw4NJBapulcDjEMfHuP2FyzzRqMmPO/4BiGrLnK+IRu3cSTH
 0/bh6oRdplx8Q7faylMnSTXxYigXfu6vjPXuIZ95Wisk9L+URzhmdwkhnnu8MRPn
 DSQfD2VvRrRr52uFiR+LppspPrb8ru6EqORW9ShpugM0V9XPiGyYnNFlCMtoCpgf
 fYx5p2F23fXNq461dB6UwZfIM9jvMvrNsb3h3+pvpN/y5UbsW6kMUD38MwZxlSPT
 z18P87HKHXGNc6+pQK7zI89I7g+2W5TCZVg0/w5DGTXkOlDQPi9X9woaOYcJIPYJ
 LcDG0uM18kI=
 =v0WH
 -----END PGP SIGNATURE-----

Merge tag 'erofs-for-6.9-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:
 "Three fixes related to EROFS fscache mode. The most important two
  patches fix calling kill_block_super() in bdev-based mode instead of
  kill_anon_super(). The remaining patch is an informative one.

  Summary:

   - Better error message when prepare_ondemand_read failed

   - Fix unmount of bdev-based mode if CONFIG_EROFS_FS_ONDEMAND is on"

* tag 'erofs-for-6.9-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: reliably distinguish block based and fscache mode
  erofs: get rid of erofs_fs_context
  erofs: modify the error message when prepare_ondemand_read failed
2024-04-29 08:52:08 -07:00
Arnd Bergmann
7194048ccf i.MX ARM device tree for 6.10:
- New board support: Seeed Studio NPi dev board, UNI-T UTi260B thermal
   camera board.
 - A couple of IRQ config correction for touchscreen and RC5T619 on
   tolino-shine2hd device.
 - Add snvs-poweroff support for i.MX7.
 - A couple of dtb_check warning fixes on i.MX6SX and i.MX6QDL ESAI.
 - Enable USB support for imx6qdl-udoo and imx27-phytec.
 - A big series from Uwe Kleine-König to adopt #pwm-cells = <3> for i.MX
   devices.
 - Other small changes and clean-ups.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmYuFjsUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7KlAf9F7zMgK6bpLSm8HxJcNcwvc8ABImm
 hJcUMeNAzXjN+vK85gBiUrjXGcWYC4fxPBAB2gASTxmmsdg2NsVWJmTzeFRfMpbs
 J/QzAkmhEeZUsB8OBeewqFVk2Uq1N+enxheeNEjqzXYcMhJU+dhnAAa+4g0q6uVS
 OSK11W3AR0r+RwWOV0Dw0koUhkyQT37S0BgfryKvcRX+qtON3vuOwqYj4QesOPMS
 Kpyf75jmxEtom7eh1/T0UMqLh2lxnraxx15QiXZcxPMS5wxk9QAYvOTaXmFgz7Z4
 RDgu6NToVIqAthnQUjUU6IPU34hxpjxBQwlhVPHTqVf4PQn8K6mP8cRXjw==
 =/0Ag
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvwd0ACgkQYKtH/8kJ
 UifWRRAApkko9eBq6mGi3Itx4wFyMFxuxLb37Z930uNJTszM1ALLNIhIX7fbU3GJ
 uDajeEI1vCwBSQyNxJd+J3I+8g38Psx5z6UP0VM8W/TuAMs8OqeCcn5i1atWr/ep
 Hfx/BnbxhxPDOslu0vuUUfxNam0ljcWJut2QADtxk61nWCTorN/JrZbgsGrIFab9
 ZfAdT+3hE7lq6X7cMJcffylPIOEbsB1/X+iUkdtpYM0l/ZiG1x/YCYh1/DspLVGz
 svRB/y55/k1QZYF9o4I5TnFlHBOMxLt8suohTeHhy6QDYlVV21MtTwHMmtNieOFa
 xNovDomGfwBj9h7FSCHrARV4Yc2lTdnf0EY8DBkLCy/rlA9HPRR30KRxqtDMD/EW
 HQQvyUfScJ5BYwol533BgrqYvrla+GDwVhMWjb6NDew8SYYTJDvrmMe7G0nyFZ2Y
 NC3M5XihZ27xD2sp+Cn0WPRXS5YCk1dgJ3y6vJZcJ9DOoVp+l39aQSo/1f35rNc7
 86XvrViydHRpl2RD+ThfmqNeZT/6fqP4vW+UcV7/oWIrpMzNqsTQDbBbLgQlS1uU
 LH3cYFXwoD8poIDUnwgWu827Rdr4cNp1NpEyO6SgFr89LkhLmdWNdlD4ot7C6JyU
 uxSD1FCk5MnqCnVv25Dr9qZPHYBLIKhKe5wDmQOWCl99UliX2tI=
 =6tZF
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt

i.MX ARM device tree for 6.10:

- New board support: Seeed Studio NPi dev board, UNI-T UTi260B thermal
  camera board.
- A couple of IRQ config correction for touchscreen and RC5T619 on
  tolino-shine2hd device.
- Add snvs-poweroff support for i.MX7.
- A couple of dtb_check warning fixes on i.MX6SX and i.MX6QDL ESAI.
- Enable USB support for imx6qdl-udoo and imx27-phytec.
- A big series from Uwe Kleine-König to adopt #pwm-cells = <3> for i.MX
  devices.
- Other small changes and clean-ups.

* tag 'imx-dt-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (64 commits)
  ARM: dts: imx6ul-pico: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-kontron-bl-common: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-kontron-bl-43: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-isiot: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-imx6ull-opos6uldev: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-geam: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-ccimx6ulsbcpro: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6ul-14x14-evk: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sx-softing-vining-2000: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sx-sdb: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sx-nitrogen6sx: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sll-evk: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6sl-evk: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-var-dt6customboard: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-prti6q: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-pistachio: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-novena: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6q-kp: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6qdl-skov-cpu: Use #pwm-cells = <3> for imx27-pwm device
  ARM: dts: imx6qdl-savageboard: Use #pwm-cells = <3> for imx27-pwm device
  ...

Link: https://lore.kernel.org/r/20240428121247.10370-3-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 17:50:53 +02:00
Arnd Bergmann
3fdb967e68 i.MX DT bindings for 6.10:
- Add vendor prefix for Emcraft Systems
 - Add compatible for new boards: Emcraft Systems i.MX8M Plus NavQ+ Kit,
   Colibri iMX8DX, Seeed studio NPi base board, NXP S32G3 board
 - Drop reduntant toradex,colibri-imx8x from fsl.yaml
 - Add usbmisc compatible for i.MX8ULP
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmYuDi0UHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM4N+gf/QZUrTCupA+qb6V25FJMOW4mUOOMR
 BlINyRhVDm0AFZx+r7qkxBRbZhS7cSrhYINo/LUOYgxy2Zm447L0ZwiZEZnbgyER
 btNkBX3cA7JjCmYFKctl/17wuoV11xR5JqQDZpe3/18nSdxD9lbQ+9pfNvajtng9
 bKPFvevFGKz5LW5dR1X8r0GsSppzrP3t2/WrC7yfgCGruplbpaR0VMByLdrCAEz6
 uvY2Am7CQ7f1AHqen00EfkBNMlCO3CmqO1UuI5qBSUcKJIJO/pEWEU/gxpWSTvoj
 rS2jZTIE9kkv8+ywxLGwvJ+vw2b59W8CSNuuqU884nI1GClMi7jgXJHxJQ==
 =jOXd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYvwagACgkQYKtH/8kJ
 Uie+0g//bvlQMesclVRdpC/MimF5ZQg3jHwhuEm6CFLmqmFUKoS1BpRLJ5ah46I8
 S1SQVLIUMavRdXQA3w1o1FDnl0HrabDLhoA3X9nOMv1nIUlTcIa5CN5Kcjs0XIeh
 9i/pKOFWe4j3Me05ixeSCyW16QT0JhWazJYkefULuAs24WkkamBBM9Hozow3PLpu
 +pI9KJ+MRVBT1IOt0iGzXFyy2hhHqYWBTKbrcgSYuLu5mA3G/fyORmSWZdnS1zqK
 BzxCjem2Zj5DSxV8JfL9nEYOxM5IJZdGC59Ifju+zFdOgG7giHLepagTFPidf795
 SJVFnrbOA0hmw/hNcnXOP3tputyZ7JvnYi5ygZX54BeJkMBgAyt97SfDVDb9RM2A
 Ab/HV8vtMCKsu5cmgRZlxyWuxvLkN7/lgmZM/EdUBt3/eFFaVLgy7Lb2Sn6TR2Rq
 lWqv6hiZ83h681r44t4dn2n9t28JNoGwKg6arHkAB/z4vLv1lQaDQv6+3PL5bPg1
 LXvmslQlbmrEEpGcPGrNiN96hEHF/FqDsxL3kjrZgtjQo4tLeMBmehd3GXH/ciau
 fqd2tDnCqB3s6OKvi1hny6gzmT7bNWZLDCe+4MMimElHMyySlmhwnoHNWdQ0BK6J
 spIuUy5VFLHy0kMhzETMRyzYvVKZkK+Gise60Oega9khahpynHY=
 =5uZ/
 -----END PGP SIGNATURE-----

Merge tag 'imx-bindings-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt

i.MX DT bindings for 6.10:

- Add vendor prefix for Emcraft Systems
- Add compatible for new boards: Emcraft Systems i.MX8M Plus NavQ+ Kit,
  Colibri iMX8DX, Seeed studio NPi base board, NXP S32G3 board
- Drop reduntant toradex,colibri-imx8x from fsl.yaml
- Add usbmisc compatible for i.MX8ULP

* tag 'imx-bindings-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  dt-bindings: usb: usbmisc-imx: add fsl,imx8ulp-usbmisc compatible
  dt-bindings: arm: fsl: Add Colibri iMX8DX
  dt-bindings: arm: fsl: remove reduntant toradex,colibri-imx8x
  dt-bindings: arm: Add Emcraft Systems i.MX8M Plus NavQ+ Kit
  dt-bindings: vendor-prefixes: Add Emcraft Systems
  dt-bindings: arm: fsl: add NXP S32G3 board
  dt-bindings: arm: fsl: Add Seeed studio NPi based boards

Link: https://lore.kernel.org/r/20240428121247.10370-2-shawnguo2@yeah.net
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 17:50:00 +02:00
Hagar Hemdan
4b2543f7e1 efi: libstub: only free priv.runtime_map when allocated
priv.runtime_map is only allocated when efi_novamap is not set.
Otherwise, it is an uninitialized value.  In the error path, it is freed
unconditionally.  Avoid passing an uninitialized value to free_pool.
Free priv.runtime_map only when it was allocated.

This bug was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Fixes: f80d26043a ("efi: libstub: avoid efi_get_memory_map() for allocating the virt map")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-04-29 17:47:32 +02:00
Ilpo Järvinen
4c407392c1 PCI: Clean up accessor macro formatting
Clean up formatting of PCI accessor macros:

  - Put return statements on own line

  - Add a few empty lines for better readability

  - Align macro continuation backslashes

  - Correct function call argument indentation level

  - Reorder variable declarations to order of use

  - Drop unnecessary variable initialization

Link: https://lore.kernel.org/r/20240429094707.2529-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: drop initialization, tweak variables to order of use]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2024-04-29 10:43:58 -05:00
Michael Walle
c84b3925c7 mtd: spi-nor: replace unnecessary div64_u64() with div_u64()
Both occurrences of div64_u64() just have a u8 or u32 divisor. Use
div_u64() instead. Many 32 bit architectures can optimize this variant
better than a full 64 bit divide.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/9ba7f4e6-2b8b-44a3-9cac-9ed6e50f1700@moroto.mountain/
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
[pratyush@kernel.org: touched up commit message]
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240429121113.803703-1-mwalle@kernel.org
2024-04-29 17:36:48 +02:00
Sumanth Korikkar
00cda11d3b s390: Compile kernel with -fPIC and link with -no-pie
When the kernel is built with CONFIG_PIE_BUILD option enabled it
uses dynamic symbols, for which the linker does not allow more
than 64K number of entries. This can break features like kpatch.

Hence, whenever possible the kernel is built with CONFIG_PIE_BUILD
option disabled. For that support of unaligned symbols generated by
linker scripts in the compiler is necessary.

However, older compilers might lack such support. In that case the
build process resorts to CONFIG_PIE_BUILD option-enabled build.

Compile object files with -fPIC option and then link the kernel
binary with -no-pie linker option.

As result, the dynamic symbols are not generated and not only kpatch
feature succeeds, but also the whole CONFIG_PIE_BUILD option-enabled
code could be dropped.

[ agordeev: Reworded the commit message ]

Suggested-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Sumanth Korikkar
5f90003f09 s390: vmlinux.lds.S: Drop .hash and .gnu.hash for !CONFIG_PIE_BUILD
Sections .hash and .gnu.hash are only created when CONFIG_PIE_BUILD
option is enabled. Drop these for the case CONFIG_PIE_BUILD is disabled.

[ agordeev: Reworded the commit message ]

Fixes: 778666df60 ("s390: compile relocatable kernel without -fPIE")
Suggested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Sven Schnelle
cae74ba8c2 s390/ftrace: Use unwinder instead of __builtin_return_address()
Using __builtin_return_address(n) might return undefined values
when used with values of n outside of the stack. This was noticed
when __builtin_return_address() was called in ftrace on top level
functions like the interrupt handlers.

As this behaviour cannot be fixed, use the s390 stack unwinder and
remove the ftrace compilation flags for unwind_bc.c and stacktrace.c
to prevent the unwinding function polluting function traces.

Another advantage is that this also works with clang.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Jean Delvare
9679fec2ca s390/pci: Drop unneeded reference to CONFIG_DMI
The S/390 architecture doesn't support SMBIOS, so CONFIG_DMI will
never be defined there. So we can simply omit these preprocessing
directives and speed up the build a bit.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20240423162724.3966265a@endymion.delvare
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:30 +02:00
Ilpo Järvinen
c9758cc45c PCI/ERR: Cleanup misleading indentation inside if conditions
A few if conditions align misleadingly with the following code block.  The
checks are really cascading NULL checks that fit into 80 chars so remove
newlines in between and realign to the if condition indent.

Link: https://lore.kernel.org/r/20240429094707.2529-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2024-04-29 10:33:29 -05:00
Sven Schnelle
fe742c08f3 s390/os_info: Fix array size in struct os_info
gcc's -Warray-bounds warned about an out-of-bounds access to
the entry array contained in struct os_info. This doesn't trigger
a bug right now because there's a large reserved space after the
array. Nevertheless fix this, and also add a BUILD_BUG_ON to make
sure struct os_info is always exactly on page in size.

Fixes: f4cac27dc0 ("s390/crash: Use old os_info to create PT_LOAD headers")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:29 +02:00
Alexander Egorenkov
a2269a66ee s390/os_info: Initialize old os_info in standalone dump kernel
The commit be42660d0c13 ("s390/crash: use old os_info to create PT_LOAD headers")
introduced use of the old os_info into standalone dump kernel.
Before this change os_info_old_init() expected to be called only from
a regular kdump kernel although the function itself is able to work
in standalone dump kernels as well (because copy_oldmem_kernel() is able
to handle both use cases). Therefore, fix the expectation of os_info_old_init()
and enable it to be called from a standalone dump kernel.

Fixes: f4cac27dc0 ("s390/crash: Use old os_info to create PT_LOAD headers")
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-04-29 17:33:29 +02:00
Pierre-Louis Bossart
c158cf9147 ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()
The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid a leaked reference.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fixes: 08c2a4bc9f ("ALSA: hda: move Intel SoundWire ACPI scan to dedicated module")
Message-ID: <20240426152731.38420-1-pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-29 17:32:27 +02:00
Matthew Wilcox (Oracle)
5af385f5f4 bounds: Use the right number of bits for power-of-two CONFIG_NR_CPUS
bits_per() rounds up to the next power of two when passed a power of
two.  This causes crashes on some machines and configurations.

Reported-by: Михаил Новоселов <m.novosyolov@rosalinux.ru>
Tested-by: Ильфат Гаптрахманов <i.gaptrakhmanov@rosalinux.ru>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3347
Link: https://lore.kernel.org/all/1c978cf1-2934-4e66-e4b3-e81b04cb3571@rosalinux.ru/
Fixes: f2d5dcb48f (bounds: support non-power-of-two CONFIG_NR_CPUS)
Cc:  <stable@vger.kernel.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-04-29 08:29:29 -07:00
Christophe JAILLET
200a289b34 mux: remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Link: https://lkml.kernel.org/r/f82e013abe4c71f1c7d06819f96472f298acdcf3.1713089554.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Peter Rosin <peda@axentia.se>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-29 08:20:07 -07:00
Christophe JAILLET
55dbc5b517 pps: remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Link: https://lkml.kernel.org/r/9f681747d446b874952a892491387d79ffe565a9.1713089394.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Rodolfo Giometti <giometti@enneenne.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-29 08:20:06 -07:00
Christophe JAILLET
0f373e6d91 intel_th: remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Link: https://lkml.kernel.org/r/2aca50a9d061faecfd4ded80b5874cd3be9b855d.1713086613.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-29 08:20:06 -07:00
Krzysztof Kozlowski
8b6d678fed
ASoC: SOF: mediatek: mt8195: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-14-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:58 +09:00
Krzysztof Kozlowski
fe80673f59
ASoC: SOF: mediatek: mt8186: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-13-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:57 +09:00
Krzysztof Kozlowski
48d5f1800d
ASoC: SOF: intel: byt: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-12-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:56 +09:00
Krzysztof Kozlowski
936cc56044
ASoC: SOF: intel: bdw: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-11-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:55 +09:00
Krzysztof Kozlowski
232e0da9fa
ASoC: SOF: imx8ulp: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-10-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:54 +09:00
Krzysztof Kozlowski
66d49ab5fb
ASoC: SOF: imx8m: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-9-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:54 +09:00
Krzysztof Kozlowski
ab85c44973
ASoC: SOF: imx8: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-8-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:53 +09:00
Krzysztof Kozlowski
04f2f516be
ASoC: SOF: amd: acp: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:52 +09:00
Krzysztof Kozlowski
6032eefc2c
ASoC: SOF: intel: hda: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-6-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:51 +09:00
Krzysztof Kozlowski
8f2b0d55ab
ASoC: SOF: intel: pci-tng: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-5-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:50 +09:00
Krzysztof Kozlowski
8bbc692d1a
ASoC: SOF: Constify stored pointer to snd_sof_dsp_ops
The core code does not modify the 'struct snd_sof_dsp_ops', stored in
'struct sof_dev_desc'.  Make the pointer to 'struct snd_sof_dsp_ops'
const to annotate this, make code a bit safer and allow individual
drivers to also define this structure as const.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-4-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:49 +09:00
Krzysztof Kozlowski
a0db037df9
ASoC: SOF: pcm: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-3-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:49 +09:00
Krzysztof Kozlowski
ee5acc1e03
ASoC: SOF: ipc3: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-2-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:48 +09:00
Krzysztof Kozlowski
ffca099bbf
ASoC: SOF: debug: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-1-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:47 +09:00