Commit graph

1,481,701 commits

Author SHA1 Message Date
Matti Vaittinen
d475fcefbb hwmon: (pmbus/adm1275) Support module auto-loading
Populating the i2c_device_id -table is not enough to make the
driver module automatically load when device-tree node for the
power-monitor is parsed at boot.

Adding the of_device_id tables causes the driver module to be
automatically load at boot. Testing has been done with rather old Debian
system.

When inspecting the generated module-aliases with the insmod, following
entries seem to be the difference:

alias:          of:N*T*Cadi,adm1075C*
alias:          of:N*T*Cadi,adm1075

I suspect these are required for the module loading to work.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/9eca6831f9fe2d781bb88337397c39b10e36f5c6.1782458224.git.mazziesaccount@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Matti Vaittinen
b0374b52b4 dt-bindings: adm1275: ROHM BD12780 hot-swap controller
Support ROHM BD12780 and BD12780A hot-swap controllers, which are largely
compatible with the Analog Devices adm1278. Main difference between
the BD12780 and the BD12780A is, that the BD12780 has one I2C address
configuration pin more (ADDR3) than the BD12780A.

Introduce own compatibles for both variants but require the BD12780A to
always have the BD12780 as a fall-back.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/2b7d5bb8cba773d0bba1d6779f0e6daa6a40eed4.1782458224.git.mazziesaccount@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Flaviu Nistor
5a260163e1 hwmon: (chipcap2) Add support for label
Add support for label sysfs attribute similar to other hwmon devices.
This is particularly useful for systems with multiple sensors on the
same board, where identifying individual sensors is much easier since
labels can be defined via device tree.

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20260625160423.17882-2-flaviu.nistor@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Flaviu Nistor
aa28a6c3a2 dt-bindings: hwmon: chipcap2: Add label property
Add support for an optional label property similar to other hwmon devices.
This allows, in case of boards with multiple CHIPCAP2 sensors, to assign
distinct names to each instance.

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260625160423.17882-1-flaviu.nistor@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Abdurrahman Hussain
bee42c6311 hwmon: (pmbus/xdpe1a2g7b) Add regulator support
Register both dual-loop output channels with the regulator framework by
populating regulator_desc[] and num_regulators in pmbus_driver_info.
This exposes the standard PMBus OPERATION-based on/off control and
status reporting to consumer drivers.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Link: https://lore.kernel.org/r/20260619-xdpe1a2g7b-v1-1-428c3847be0d@nexthop.ai
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Ximing Zhang
6a9ad0ac9b hwmon: (coretemp) Clarify attr_size comment
The attr_size field stores the number of sysfs attributes created for a
temperature data group. Clarify the comment to describe the field directly.

No functional change intended.

Signed-off-by: Ximing Zhang <xzhangjr@gmail.com>
Link: https://lore.kernel.org/r/20260616125631.35537-1-xzhangjr@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Ximing Zhang
bf74d14fba hwmon: coretemp: Fix documentation wording
Fix two minor wording issues in the coretemp documentation.

Signed-off-by: Ximing Zhang <xzhangjr@gmail.com>
Link: https://lore.kernel.org/r/20260616121549.29484-1-xzhangjr@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Potin Lai
a86e9ca4ed hwmon: (pmbus/lm25066) add current limit configuration support
Add support for the 'ti,current-range' devicetree property to configure
the current limit via the DEVICE_SETUP (0xD9) register, overriding the
physical CL pin setting.

This configuration is supported on all chips in this driver (LM25066,
LM5064, LM5066, LM5066i) except LM25056.

The property values "low" and "high" map to:
- LM25066: low = 25 mV, high = 46 mV
- LM5064, LM5066, LM5066i: low = 26 mV, high = 50 mV

The Bit 4 mapping to High/Low current limit is handled dynamically on
probe because it is swapped for LM25066 compared to the other supported
chips.

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
Link: https://lore.kernel.org/r/20260615-lm25066-cl-config-v3-2-decb4f5b0b77@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Potin Lai
47afef9f4c dt-bindings: hwmon: pmbus: ti,lm25066: add current limit properties
Add a 'ti,current-range' string property to configure the device's Current
Limit (CL) behavior to "high" or "low" via the register, overriding the
physical CL pin setting.

This configuration is supported on LM25066, LM5064, LM5066, and LM5066i.
LM25056 is excluded because it does not support configuring the current
limit via the DEVICE_SETUP register (bit 2 of DEVICE_SETUP is reserved).

The values "low" and "high" map to the respective low/high threshold
voltages of the chips:
- LM25066: low = 25 mV, high = 46 mV
- LM5064, LM5066, LM5066i: low = 26 mV, high = 50 mV

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20260615-lm25066-cl-config-v3-1-decb4f5b0b77@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Ziming Zhu
efd053e3f6 hwmon: Add documentation for SQ24860
Document the supported sysfs attributes for the Silergy SQ24860 PMBus
hwmon driver.

Signed-off-by: Ziming Zhu <ziming.zhu@silergycorp.com>
Link: https://lore.kernel.org/r/20260612030304.5165-4-zmzhu0630@163.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Ziming Zhu
93ab13d896 hwmon: (pmbus) Add support for Silergy SQ24860
Add PMBus hwmon support for the Silergy SQ24860 eFuse.

The driver reports input voltage, output voltage, auxiliary voltage,
input current, input power, and temperature. It also exposes peak,
average, and minimum history attributes, sample count configuration,
and maps the manufacturer-specific VIREF register to the generic input
over-current fault limit attribute.

The IMON resistor value is read from the silergy,rimon-micro-ohms device
property and used to configure the input current calibration gain.

Signed-off-by: Ziming Zhu <ziming.zhu@silergycorp.com>
Link: https://lore.kernel.org/r/20260612030304.5165-3-zmzhu0630@163.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Ziming Zhu
4cbf6f017a dt-bindings: hwmon: pmbus: Add bindings for Silergy SQ24860
Add devicetree binding documentation for the Silergy SQ24860 eFuse.

The device is a PMBus hardware monitoring device which reports voltage,
current, power, and temperature telemetry. The board-specific IMON
resistor value is described with silergy,rimon-micro-ohms.

Signed-off-by: Ziming Zhu <ziming.zhu@silergycorp.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20260612030304.5165-2-zmzhu0630@163.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Martino Facchin
d1db9b08fb hwmon: (ina2xx) Add support for INA232
The INA232 is a current/power monitor. It shares the same register
layout as the other chips in the series and uses the INA226 default
configuration, but differs in its electrical characteristics:

Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260611-monza-ina232-v2-2-e4375ce652d0@oss.qualcomm.com
[groeck: Rephrased commit message]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:40 -07:00
Martino Facchin
6fe4043c16 dt-bindings: hwmon: ina2xx: add ina232 compatible
The INA232 is a current/power monitor from Texas Instruments sharing
the same register map as the other INA2xx.

Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260611-monza-ina232-v2-1-e4375ce652d0@oss.qualcomm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10 08:59:39 -07:00
Arnd Bergmann
ae675a2963 Samsung DTS ARM64 changes for v7.3, part two
Several non-functional (white-space and style) changes to match with DTS
 coding style as reported by recent dt-check-style tool.  Goal is to get
 to no `dt-check-style --mode strict` warnings over time.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmp0QnEQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1y3MD/49LDEei+r3N9p4j4L9nOKvEPgoEYo7hLUW
 IkXu6zHH5BwrRCotTRVs/FLnCrksT1xF8K0D9FABi7QCsfF0AGQ49iXUcad/ahgX
 oLseMSsw/+yI9nTfj27a70jF2jFV03841PEZsxZnoA1SqM8sJ3PKymZnBIqQyMVJ
 iM8O+iydWRskPofQ9I19QlEcovUNUnrfM7UZSob7dplUd5lMgzrpe5LORrApnCRq
 enEYW9kYib2aEVMgfLn4UM6LJRVLY//QnDCHd1MEkePcM+JveH16KBBzdAChXwUq
 J6fqqkJpmnDJ8c40lSFd41a8xtlmGN30wH3mdqcb0EMjsJvRDRYCSQbrPp8Py6Jf
 h3Ztu2ju7kwPjhQ3ph2b+zDYZP+MaS39UUHRARC6vKCU1l5CmN68SYTuQBLYYzw1
 RUdlrqzwk3QDFVGvmwwruTzJ0V8Nq3hEfZ6T6VWy04qYrA7HtmYmvTOh7HMye0U6
 kjuORcqxTeM6I/1U5HDAwdGEFYc8yWnjVnkMA+SPdlKqMbzaCvqYn0FUw4Guxdsd
 hkFuxdPdGAr/BrF7w/2HcLKBaWvpW3wAz1C4JNtwl5HL7pWEmzfFF+mILH50TmSU
 r4RKzUrQ2nWNUAsxL+HwaxPXV02/CauVZNZ4ETiQLuJ0HA3yrCabgJpo3y30Iwaw
 GhPRBOwx3A==
 =E6Qd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp59RgACgkQmmx57+YA
 GNmo6RAAwTDXcf1PZUXE8Sz9DQH0FITBu58nU6RzKYLwzwLwoR7yzv1wKDPmpA6/
 5pTOwyp6E2kuIMBxfCIKm/1dVXw7aRwLjKrgUij/XxBDI3Ci80OmH+mXgHika6bO
 +4G84JePxDg0J+h22YyIa70ElxXI5A6/gPS7JoQMQ4Shu8nLgPO1JUTWV/RIHuT3
 NH6QE8YcEAtLQJ0IvJhhfHJ618Wzg7t8KjaV33tUgaD5Tf4Rrfk5Tpob/Bf9qCcN
 yXo/El9UmOpY/itbULvBLyRuHlemrPG7gC5hJ0zWDr/69g5+oUAcQWTzlQ5Q2PbO
 l/YORSCsbc7bFqYxk1tdoqxCAVHtSQb5sVKN7tGQVcGJx6ht4MLa1q9nSiySBOHE
 XG1WySSjl7bwgQkx4FhT5CT2ogqJe6lFGPAMMRvmWQA3ZxB7s8VpMxyk8jnoRczc
 nhrqUu9U8/woJeXMXzbyzjkcmHAdn1eyp5rYniz58Qe5ZNZ7tJnwmpfaLvcFEWqZ
 gTsPuxA7h6n8gxf2g502WAdyd24mv8/oeaatS9RyxTOl0W1Ha+k76wpoEj+o+nTa
 2AfnfUJrO7b13rWh72nhsrq0aKK+3LKnb+4Oq899QV1DsZGsCAULiEn5dP8cvnik
 93AeDWQCiXU7wsm3IB/DHk4vcrtayuaDbcqiDO8wB9bkaTkP/xk=
 =Cr80
 -----END PGP SIGNATURE-----

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

Samsung DTS ARM64 changes for v7.3, part two

Several non-functional (white-space and style) changes to match with DTS
coding style as reported by recent dt-check-style tool.  Goal is to get
to no `dt-check-style --mode strict` warnings over time.

* tag 'samsung-dt64-7.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: Correct white-space style
  arm64: dts: fsd: Align continued properties and add missing blank lines
  arm64: dts: fsd: Move 'status' to the end to match coding style
  arm64: dts: google: Align continued properties and add missing blank lines
  arm64: dts: google: Move 'status' to the end to match coding style
  arm64: dts: exynos: Re-order clocks and align continued properties
  arm64: dts: exynos5433: Override thermal zones by phandle
  arm64: dts: exynos: Align continued properties and add missing blank lines
  arm64: dts: exynos: Move 'status' to the end to match coding style

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 17:58:11 +02:00
Arnd Bergmann
c26bfefed0 More new boards: LincStation E1, Vicharak Vaaman, EmbedFire LubanCat 4,
ArmSoM CM5 + IO-board and the Anbernic RG Vita-Pro handheld
 
 Apart from that some board-level changes and style fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmpzdxcQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgdkmCACF8GcP7MHJJc2vs1uVSOzyHbFXI7oyr6Lb
 hY6VGRWXv1HzrKXIrM4pw3LgHv/NusDAMy8VOQS7DSDSVgo7YS8fBOjvG7AfEKl7
 Rqssz6CbmQ9gZOPdjuzJakvO/cNGEahcUSWXiibrZx5wq9dKXIzKww5DwhFSX8jX
 OIx4JR+r9uY/mx/S0UdIKgopYJMMrU4TJ3EPHZA6lxIxOgYsccbTr8JdYpq3cJaW
 RoLXsZzIWJfvIFdsss9Ke8Sb37Mllc0G4QcQxa0p12CEVVEE+hiURcCMjiZiFfmw
 oPGbCROBNGBew1kQ/4uy/s4FYhfIAKsWHAqJ/OqqEZ5R1P4QzuGG
 =oxHJ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp59HgACgkQmmx57+YA
 GNnRBA//Zq16dutiQkzCHOQ8lICTUfaAVgumr8RsfeM34O6QK+NQ0QUtSJS9xEsl
 6F8zoeTdmwQVrWhBv9H4LOLGgLqCBANnOUx0ZrTM2dm5ODRVd8wKfwyRrMtJZvGN
 EloKKzCP39fySoGUPpizcNIkwNPcPPwCj5w6bCISv7fiSD2AXbMSzGFjmDRAuAMX
 q5zEn9EHdR5c7kCStuh48KNZu7P6JUOYGJN8OO8UugFGIB2sj+E96Pm7QdQo9iB1
 EIFSUQNAYiiS5wAPTntoITCL6q6FHxnb7Fv/NZMeQSSYc81X0TLwVrNn0Bp/gt3H
 fU16abQ2xQu8slXvOPvOjeUaO7wHlZrzUjX2ZvTZzAXbiDuWAYQmnzSTtT4uvv4I
 nsO19qNVPInOjQbDVWzF/e02ZKHwOnoB31gtyUBt/39hUS4TPuPXOJEoqM6cxfZM
 rZdSNgiPzYLE/Uar8o3DNn5KRUzzPzsPVkVqZSj5gEydHpKf/NV8qIvYLe63ZX0T
 4kScTxlgCJ106a5eI6H8SQQ+4PfZaznEFhTU1d1N25IogIIClaY3xk3myX74U/lu
 qjmq6NtTI5laLjbG0rB5nqrVDrd3f8mrYVfkqFW/m1ehXY8qn/YPZX8RwWGVOxMb
 CovKkI8wSls8V0HIqyZerKrqinVN+YW6Z+NbeRMtNbx+Jb33Lys=
 =peeG
 -----END PGP SIGNATURE-----

Merge tag 'v7.3-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt

More new boards: LincStation E1, Vicharak Vaaman, EmbedFire LubanCat 4,
ArmSoM CM5 + IO-board and the Anbernic RG Vita-Pro handheld

Apart from that some board-level changes and style fixes.

* tag 'v7.3-rockchip-dts64-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Add LincStation E1
  dt-bindings: arm: rockchip: Add LincStation E1
  arm64: dts: rockchip: Add Vicharak Vaaman board
  dt-bindings: arm: rockchip: Add Vicharak Vaaman board
  arm64: dts: rockchip: Add icm42607p IMU for RG-DS
  arm64: dts: rockchip: Correct white-space style
  arm64: dts: rockchip: Add EmbedFire LubanCat 4 board
  dt-bindings: arm: rockchip: Add EmbedFire LubanCat 4 board
  arm64: dts: rockchip: Keep rk3399-roc-pc-plus work LED on
  arm64: dts: rockchip: Enable wireless on rk3399-roc-pc-plus
  arm64: dts: rockchip: Fix rk3399-roc-pc-plus analog audio
  arm64: dts: rockchip: Add CSI-2 bus type to ROCK 5B+ camera overlays
  arm64: dts: rockchip: Drop data-mapping from Engicam PX30 Core
  arm64: dts: rockchip: Add Anbernic RG Vita-Pro
  dt-bindings: arm: rockchip: Add Anbernic RG Vita-Pro
  arm64: dts: rockchip: Add ArmSoM CM5 and CM5-IO
  dt-bindings: arm: rockchip: Add ArmSoM CM5 and CM5-IO

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 17:55:33 +02:00
Arnd Bergmann
59944d90a9 Whitespace fixes
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmpzdTgQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgZ6/B/9zrgtxbCfOAYPoXeJ21ZO8V/L2+n8sRY36
 bU6Z/E143JEaie9idpnwKEwOFnL4ubIO91l1PJ/Zfn8WvcIvapEdOlw0ECYWbSAa
 nJ2IG7oKh9146HaXPAZcksZQmcbiEn8uOc4dcYnlXu1AVyI06sPSE+MzCdYCrbvn
 Luo1f27Er/JGJxqS+/pvn518sX/jCw+kk0XKVHuYHwFQOQ3scl2jFqDdZGx+9mn6
 gjav9iBeYeDUXEqM7CVMK9SlPF+SQ3R4ZsAQG/f/CMnEKUQ3zAx+mwG21/far5t9
 FEByXxldc2fOHn+Ohcmp5J3MbHzN8ba5JqNVILMYcd5dYtk8739g
 =ywB6
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp59CkACgkQmmx57+YA
 GNn09w/8DicHMpN+JM12lJDwt/R/mYM/LdN41AlrUypr+ab5wh1dBwUQN8EVBKrU
 2uo7G7KLT/WQt5zTlpQgcPke93g04KZIbDZDdGVUpdCbEO30gHzLcr6WQvQFmBLA
 uDF0AuJ3qrrFZWgZ3n5/fuwWtZC9BMKM61vsZPEMIuTr5oG13SFX/kGHeT8YRfNl
 VV+i6XL1nLA43HcnrcoN5IvSQAKsVWObyn7gpyDqmWyH0fY6GzHnB55SiSrltTpq
 JtaRx6bPI37aeSrhqC/nwOIfhEzIZO4cNAq3WRn78xC42spzhOoTuZVz3CzfFB1h
 FFmANlnSMU4rNmivU05++/2PvdL/gpArlFOqizBBpb20HS4NBhS/8Z5J2xCFB31v
 SoziuD58pCva1YCb6C+z7Yl6PlmyFWvdbiqmANKruqfB9ZneSUipCCeUMb0EdDFk
 kvndEC2VaBwP8OoWWfRFV3esAtkiV+FnGFrn/GvnMTf6Xj6l8RviieN1iNWnVgAM
 iH9s7BoFRkN3ghbDlWZg1L+VsVu8DEajfc5YnNlEdtEvfD+ZBJ9jmZS11fu3552s
 5DO6uYRGBn7q76uQbymTZhRGWo0aC6qByJ+UCg2AiBS3nPszAC8oV8Z2RxSWqwaV
 sBeg3Ca7shLiuD+erZPFQZEQKhI5uQ6onHF0xTW8uNWmIVO2MBc=
 =VMyL
 -----END PGP SIGNATURE-----

Merge tag 'v7.3-rockchip-dts32-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt

Whitespace fixes

* tag 'v7.3-rockchip-dts32-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: Correct white-space style

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 17:54:14 +02:00
Dennis Moshegov
d7fc133bf9 timekeeping: Use READ_ONCE/WRITE_ONCE() for xtime_sec to prevent tearing
The timekeeper update path uses a bulk memcpy() to synchronize the
timekeeper structure, which is not guaranteed to be atomic. This allows for
torn reads in ktime_get_real_seconds() on 64-bit systems, where the
sequence counter protection is bypassed for performance.

To prevent reading a torn 64-bit xtime_sec value, enforce atomic-like
access by using WRITE_ONCE() for the critical field before the bulk
memcpy() in timekeeping_update_from_shadow(). Correspondingly, use
READ_ONCE() in ktime_get_real_seconds() to ensure a fresh, consistent load
from memory.

[ tglx: Format changelog and add comment ]

Reported-by: syzbot+72789cd1697965e714ca@syzkaller.appspotmail.com
Signed-off-by: Dennis Moshegov <dennis@xzync.uk>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260724154405.70-1-dennis@xzync.uk
Closes: https://syzkaller.appspot.com/bug?extid=72789cd1697965e714ca
2026-08-10 17:52:19 +02:00
Takashi Iwai
0252ad169c ALSA: seq: Use RCU for the UMP client output substream
The UMP sequencer client protects its output rawmidi file (out_rfile)
with an rwlock (output_lock).  seq_ump_process_event(), the port's
event_input callback, reads out_rfile.output under read_lock on every
delivered UMP event, while the open/close paths (serialized by
ump->open_mutex) publish and clear out_rfile under write_lock.

Output is opened/closed only on the subscribe/use lifecycle while
delivery happens per event, so this is another read-mostly hot path.
Convert it to RCU and drop the rwlock.  out_rfile is an embedded struct
rather than a pointer, so instead of restructuring it, add an
RCU-protected shadow of the substream (out_substream) for the reader;
out_rfile itself becomes writer-only state accessed solely under
open_mutex.  The reader now runs lock-free under rcu_read_lock() via
rcu_dereference(), and open publishes the substream with
rcu_assign_pointer().

On close the substream is cleared with rcu_assign_pointer(NULL) and the
rawmidi is released only after synchronize_rcu(), so no reader in the
delivery path can still be writing to the substream when
snd_rawmidi_kernel_release() runs.

Dropping write_lock_irqsave() from the writers is safe: they run in
process context under open_mutex, and the sole atomic reader now uses
RCU, which is IRQ-safe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260810133711.42483-6-tiwai@suse.de
2026-08-10 17:44:34 +02:00
Takashi Iwai
7ffa5d2462 ALSA: seq: Use RCU for the virmidi file list
Each virmidi device keeps a list of its opened input files (filelist)
protected by both an rwlock (filelist_lock) and a rw_semaphore
(filelist_sem).  snd_virmidi_dev_receive_event() walks the list on the
sequencer event input path -- read_lock() when the event is delivered in
atomic context, down_read() otherwise -- decoding each incoming event
into the file's rawmidi buffer.  The writers (input open/close) take both
locks to add/remove entries.

This is another typical dual-lock read-mostly pattern as the port
subscriber list: files are opened/closed rarely while the receive
callback runs per event.  Let's convert the traversal to RCU and drop
the rwlock; the existing filelist_sem keeps serializing the writers.
The atomic input path now runs lock-free under rcu_read_lock(), and
both readers share a single list_for_each_entry_rcu() (valid under the
rwsem via lockdep_is_held()).  The writers switch to
list_add_tail_rcu() / list_del_rcu().

snd_virmidi_input_close() freed the entry (parser and struct)
immediately after list_del.  A concurrent lockless reader in the atomic
path may still be dereferencing it, so the close path now waits for an
RCU grace period after list_del_rcu() before freeing; synchronize_rcu()
is used rather than kfree_rcu() because the parser must also be released
after the grace period, not just the struct.  Non-atomic readers are
already excluded by the down_write, so only the atomic RCU readers need
the grace period.

Dropping write_lock_irq() from the writers is safe: no writer runs in
atomic/IRQ context, and the sole atomic reader now uses RCU, which is
IRQ-safe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260810133711.42483-5-tiwai@suse.de
2026-08-10 17:44:34 +02:00
Takashi Iwai
7a287e4615 ALSA: seq: Use RCU for the client table
The sequencer keeps a global table of clients (clienttab[]) indexed by
client id, protected by the global clients_lock spinlock.  The lookup
snd_seq_client_use_ptr() reads a slot and takes a use_lock reference on
the client, and this runs on the event delivery hot path: every
dispatched event resolves its destination (and often source) client
through it.  The spinlock's only job on the read side is to make the
"pointer is non-NULL" test and the reference increment indivisible with
respect to the writer that nulls the slot and then drains the refcount.

Clients come and go rarely but delivery happens constantly, so this is
yet another read-mostly case as the port and subscriber lists.
Convert the table to RCU: the read side now runs lock-free under
rcu_read_lock() and takes the use_lock reference via
rcu_dereference(), removing contention on the single global spinlock
from the delivery path.  The writers keep clients_lock (still needed
to serialize slot allocation) and publish / unpublish via
rcu_assign_pointer(); creation and destruction remain serialized at a
higher level by register_mutex.

As with the ports, the client is not freed via kfree_rcu(): its lifetime
is governed by the use_lock refcount drained in seq_free_client1().
list_del under the old spinlock excluded a concurrent lookup from taking
a new reference once the slot was nulled; rcu_assign_pointer(NULL) offers
no such exclusion, so a reader still holding the old pointer can grab a
reference after the unpublish.  seq_free_client1() therefore calls
synchronize_rcu() after nulling the slot and before snd_use_lock_sync():
once the grace period elapses no new reference can appear, and the
existing drain then frees the client safely.

clienttablock[] keeps its slot-reservation role (create/free are
serialized by register_mutex); its read on the lookup path only gates
module autoload, so a lockless read is harmless.  Dropping the spinlock
from the read path is safe: clients_lock is now taken only by the
process-context writers, and the sole atomic reader uses RCU, which is
IRQ-safe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260810133711.42483-4-tiwai@suse.de
2026-08-10 17:44:34 +02:00
Takashi Iwai
4c252fbc06 ALSA: seq: Use RCU for the client port list
Each sequencer client keeps a list of its ports (ports_list_head)
protected by both an rwlock (ports_lock) and a mutex (ports_mutex).
The rwlock is taken read-side on the event delivery hot path:
snd_seq_port_use_ptr() walks the list to resolve a port on every
dispatched event, while the mutex serializes port creation/deletion.

Ports change rarely but delivery happens constantly, so this is the
another read-mostly case as the port subscriber list.  Convert the
port list traversal to RCU and drop the rwlock entirely; the existing
ports_mutex keeps serializing the writers.  The atomic delivery path
(snd_seq_port_use_ptr(), snd_seq_port_query_nearest()) now runs
lock-free under rcu_read_lock() instead of contending on the shared
rwlock.

The writers switch to list_add_tail_rcu()/list_del_rcu().
snd_seq_insert_port() now stores the port number and name before
publishing the node so RCU readers only ever observe a fully
initialized port.  One drawback is that snd_seq_delete_all_ports()
drops the O(1) splice trick and unlinks each port individually,
though: the splice repointed the last port's ->next away from the list
head, which would send a concurrent lockless reader off the end of the
list.

Unlike the subscriber objects, ports are not freed via kfree_rcu():
port_delete() must drain outstanding use_lock references (and run
private_free()) synchronously.  The rwlock previously guaranteed that
no reader could take a new use_lock reference once the port was
unlinked -- list_del under write_lock excluded snd_use_lock_use()
under read_lock.  list_del_rcu() offers no such exclusion, so a reader
still traversing the list can grab a reference after the unlink.
port_delete() therefore calls synchronize_rcu() after the port has
been unlinked and before snd_use_lock_sync(): once the grace period
elapses no new reference can appear, and the existing drain then frees
the port safely.

Dropping write_lock_irq() from the writers is safe: no writer runs in
atomic/IRQ context, and the sole atomic reader now uses RCU, which is
IRQ-safe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260810133711.42483-3-tiwai@suse.de
2026-08-10 17:44:34 +02:00
Takashi Iwai
a9760db775 ALSA: seq: Use RCU for the port subscriber list
Each sequencer port keeps two subscriber groups (c_src and c_dest),
each protected by both an rwlock (list_lock) and a rw_semaphore
(list_mutex).  The rwlock is taken read-side in the event delivery hot
path (__deliver_to_subscribers()) for delivering every event to
subscribers, while the mutex serializes subscribe/unsubscribe and
covers the sleepable delivery and query walks.

Subscriptions change rarely but delivery happens constantly, so this is
a textbook read-mostly case.  Convert the subscriber list traversal to
RCU and drop the rwlock entirely while keeping the existing list_mutex
for serializing the writers.  The atomic delivery path now runs
lock-free under rcu_read_lock() instead of contending on the shared
rwlock.

Along with the conversion to RCU, the subscriber lists are switched
from list_head to hlist so that removal can use hlist_del_init_rcu():
it keeps the ->next pointer intact for concurrent readers while
clearing ->pprev, which lets the double-deletion guard (added in
commit 13d5e5d472) keep detecting an already-removed entry via
hlist_unhashed().

Dropping write_lock_irq() from the writers is safe: no writer runs in
atomic/IRQ context, and the sole atomic reader now uses RCU, which is
IRQ-safe.  Port lifetime handling (use_lock/closing drain in
port_delete()) is orthogonal and unchanged.

Note that the conversion to RCU has another merit: it automatically
"fixes" the (rather false) lockdep warnings for the doubly read-locks
of the same subscriber list, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260810133711.42483-2-tiwai@suse.de
2026-08-10 17:44:34 +02:00
Arnd Bergmann
bfe9922bea ARM Devicetrees for v7.3
Sophgo:
 
 Add initial support for "Duo S" Board.
 This board uses SG2000(old codename CV181xH),
 which is dual-arch, RISC-V and ARM64. This
 patch adds the support for ARM64.
 
 Signed-off-by: Chen Wang <chen.wang@linux.dev>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTYPcWJ6By3aFu8IuKHG95Quc97dgUCanJ/4wAKCRCHG95Quc97
 djWDAQCHF2gqq9CdkNOCnd8S4rgJLoqcf/2ROKS013DaUU2VGwEAh/bXJz5r6mHw
 m7vz8DeYqHGlsSDcAM3QhUA3Ot8zngo=
 =T9De
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp58WoACgkQmmx57+YA
 GNnagA/+Ig1OuY7L+/SejZdfDmODN4Qld7LZf1P31cYn6eL6rYZL0hmC37LwlpgL
 hQC1dHbpaPN4hd9Dl5I7ZEQizce9iIgOHy9Qt32yqpFNlYGcC7oM8tklJmXjMtOk
 31wl4crrl8+LUhRbcGEGIcrwUfZi+mV525Q9yA+yZ5ge9TvrtlEoPduzodzLGGt6
 MjRAqGKhhxFO17UeIai/ssWumnMFeO1SaUWdaEbfMB2Jg/1XMpyv33L8rydqK3wp
 MgnP94DdMX4sW63+3YTMLLoDPvBWWCVYRKEfC/0OkjfuYRJNXMAE+3IzU2pOsdI3
 6ykJLRYkns6fqsQpx/3faWb0gb8qq9ZGeNBpwiWKcH7ya9Ivde+4wYrEAGyn0V5e
 xf+HwQEdhSetjIdKcnVcjJ90br4q4cHP2vWkSeeiVgLIXwy9TwZniO/F/fg1gX5p
 qhTwXe+FJnQ4TfLIesvz0UI6i0bgjvhdRKPhpVzuFsENooceOiC+jJUvc/dsjQCV
 k6s7iCNJN3+510k/afKgpczxcvHrg1YlacwQXagqs0X7thN42nRbNb0mQ+pWkgX1
 y3h9Sm6OcddWGKjg1GQ52640Dn5xeacutq23GhDpZZx0tAV+z8x9hubk4Q8sDGXW
 ta+BKMIS1dJ6tD5tozeCYm6QP0HuspMZ/JtW5+hlrIfYyuthVBc=
 =hRBP
 -----END PGP SIGNATURE-----

Merge tag 'arm-sophgo-dt-for-v7.3' of https://github.com/sophgo/linux into soc/dt

ARM Devicetrees for v7.3

Sophgo:

Add initial support for "Duo S" Board.
This board uses SG2000(old codename CV181xH),
which is dual-arch, RISC-V and ARM64. This
patch adds the support for ARM64.

Signed-off-by: Chen Wang <chen.wang@linux.dev>

* tag 'arm-sophgo-dt-for-v7.3' of https://github.com/sophgo/linux:
  arm64: dts: sophgo: add initial Milk-V Duo S board support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 17:42:17 +02:00
Denis Batishchev
e7da28b820 ALSA: hda/realtek: Enable micmute LED on HP EliteBook 6 G1a p/n: AD3Q9ET#UUG
The HP EliteBook 6 G1a (SSID 103c:8e0d) uses a Realtek ALC236 codec.
Without a quirk no fixup is selected and the mic-mute LED stays off.
It needs the same ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk as the
already-supported 14" variant (SSID 103c:8dfb), so add it.

Signed-off-by: Denis Batishchev <ii343hbka@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20260810151440.2306217-2-ii343hbka@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-10 17:36:37 +02:00
Linus Torvalds
5eabf07a0b This push contains the following changes:
- Fix lockdep warning regression in rhashtable.
 - Fix default authsize in rfc4309.
 - Fix gcm cryptlen calculation in tegra.
 - Fix qce registration error-path bug.
 - Fix incorrect use of sg_dma_len before mapping in starfive.
 - Allow cbc(paes) to be used with af_alg.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEn51F/lCuNhUwmDeSxycdCkmxi6cFAmpsT0oACgkQxycdCkmx
 i6daNA/+J02CNtbzTpBDOJX/mwY6W3QZFqslzoaywgterDAC72o3tkg9/bEtqbih
 2y1UDh5RTzGoMdoB2BV9Fw8TbwSEFgzNIY7IBzvSxLu0Fu1CWvJmiJkFpY9waVBq
 mj4iCe2U1i3QFXXBd61GDoS1WGMt2exm2QWSxn9tiADwz76w13+84mEH5i+1cn5S
 Ufyz4312hZaeNBYsON2bQ4xeuMbZuxcyE+eIZQ849G2CvjMVbgrE+wNN77n2a6wo
 UI+XHkT/XpiTCYkbFA5ATTWKn/fyEnGQ0IofqdGdj+75Ch1wrswXwb697WzMQwf5
 VrxgWIFhHgzpUjJFlZNx6yd1zs978dyjw3VonILuBKUeris3yQhoYGQ1r89dshrD
 2oL8SFjHR5iSjqtowthO02kWwl9w6U4LnNGNBsXyRz5aYJJtG9ctxchqcIZe8kA5
 YQ2UnQHIfGAYIlSCcpijBGUGXCPJiDXo5ovt7PcNgtkB+/tedPhCWrznRio2ECD3
 Ebi8d48fp3cx9eS5t4C91YP+wG9T7mEgICec6H9xMLhu3MPh0oyP/i2A1e64QPv8
 VVzPbsJMvJRU5wa0/+FkJ922WLp9OkHfcGU8FUx49/zjkskMAhjTcuIEwlqOm7TI
 tsa9AlM6PrNT122WauCvnxDQ4PglsKeuYnAEhqrsbmfpJumd9kM=
 =rHls
 -----END PGP SIGNATURE-----

Merge tag 'v7.2-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:

 - Fix lockdep warning regression in rhashtable

 - Fix default authsize in rfc4309

 - Fix gcm cryptlen calculation in tegra

 - Fix qce registration error-path bug

 - Fix incorrect use of sg_dma_len before mapping in starfive

 - Allow cbc(paes) to be used with af_alg

* tag 'v7.2-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: af_alg - Allow cbc(paes)
  crypto: starfive - use scatterlist length before DMA mapping
  crypto: qce - fix error path in devm_qce_register_algs
  rhashtable: fix false-positive lockdep splat on rhltable destruction
  crypto: tegra - fix rctx->cryptlen calculation in tegra_gcm_do_one_req()
  crypto: ccm - Set rfc4309 maxauthsize from child
2026-08-10 08:36:22 -07:00
Brian Koebbe
2ce1d17dcb ALSA: hda/realtek: Fix quiet 3.5mm jacks on Beelink SER6
Both the front headphone jack and the rear line-out jack play back
at a barely audible volume on the Beelink SER6 Max (ALC897, PCI subsystem
ID 1f66:0202), even with all mixer controls at 0dB. GPIO2 on the
codec gates an external headphone/line amplifier that the generic
parser never enables. Add a fixup that asserts it. Verified fixed
on both jacks.

Signed-off-by: Brian Koebbe <brian@koeb.be>
Link: https://patch.msgid.link/20260810145700.1206010-1-brian@koeb.be
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-10 17:35:06 +02:00
Arnd Bergmann
545ecc3577 RISC-V Devicetrees for v7.3
Sophgo:
 
 The changes of this PR are all for CV18xx serials.
 There are three major changes. The first is to allow
 DMA multiplexer setting channel number for DMA controller;
 the second is to add initial RISC-V support for "Duo S"
 board, which uses SG2000, a dual-arch SoC (RISC-V and
 ARM64); the third is to add support for "Duo 256M"
 board, another dev-board based on SG2002 SoC.
 
 Signed-off-by: Chen Wang <chen.wang@linux.dev>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTYPcWJ6By3aFu8IuKHG95Quc97dgUCanKEvQAKCRCHG95Quc97
 dn44AP9HHp2ut8rY0UnmS/s+rCAbWX/2YkhGWdWPPk1o4VkSdQEArt9F9RpXg/Mp
 RfmT/LEx81g7zR7wqpGlpy1a5F+TBw4=
 =SAg0
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp57JAACgkQmmx57+YA
 GNla7xAAqMRFdMgCOH74zaNtohonnSgbmJi4dL6RakzJHCjZO+VWMnxavg/A8qTb
 DrSugeW0SV1pe/NbOKaJbqZ6xa/gJJitivPNJIgn8uM3WauetzE55isGPb+smR1r
 soqTG/3AYocT88fy7FgLL3GmvY9yd1dAOHA/CFdTpmBdrqfV5fSSmed08wM0lVQe
 O1EgjHe7eNk+v3DYo80buRxwljiW0gpbhFFsz84hbdFoL/Cf/GAXWP1xhZjCTKo1
 9/Zex3J7SsdNAaZjDzMyF0S0eolyAPJW0SzToDkMniE/tSYc2lkjW7R1I55iuQvi
 BJ+kKK1k2/TrSbmvjuvqCEnwfOh9BzXPf4UWuLrUrEVTpdEBtpe0otFGRBqzg0lO
 RkgUPdHWR8uhL57Oos8HM4WH2VN4s0jqP0FN1sUp46fnnQFCEi/nO4vRTnOt+ppy
 HxNjJyQRrP97OH7s7zpUTyCVVJBZPL3EF3NuNCzioooXK3LHI4MSApTtDIt9bPBi
 yS5U1SaUaNm4RwCaFH9QZSQHXdoEXKe0DPX/P9cROr62T6eSyDhZnIIcucveMw+6
 tJie38mJChficq8mCo3/S1P3gMELy5lmBw68XCg/UMBcdV76Mq4AgFq6o5Ow+oXp
 KS/sO+RkxZPD7ImnGLKrSuurJnIsMpOR/69lLFBkZ0LBtdZY9W4=
 =CrHg
 -----END PGP SIGNATURE-----

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

RISC-V Devicetrees for v7.3

Sophgo:

The changes of this PR are all for CV18xx serials.
There are three major changes. The first is to allow
DMA multiplexer setting channel number for DMA controller;
the second is to add initial RISC-V support for "Duo S"
board, which uses SG2000, a dual-arch SoC (RISC-V and
ARM64); the third is to add support for "Duo 256M"
board, another dev-board based on SG2002 SoC.

Signed-off-by: Chen Wang <chen.wang@linux.dev>

* tag 'riscv-sophgo-dt-for-v7.3' of https://github.com/sophgo/linux:
  riscv: dts: sophgo: Add Milk-V Duo 256M board support
  riscv: dts: sophgo: cv180x: Add PWR_GPIO controller
  dt-bindings: soc: sophgo: add Milk-V Duo 256M board
  riscv64: dts: sophgo: add initial Milk-V Duo S board support
  riscv64: dts: sophgo: add SG2000 dtsi
  riscv: dts: sophgo: cv180x: Allow the DMA multiplexer to set channel number for DMA controller

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 17:21:50 +02:00
Arnd Bergmann
1f5d8228ca Revert "riscv: dts: spacemit: k3: add i2s0-i2s5 nodes"
This reverts commit cd01c67786, which
caused a build failure:

Lexical error: ../arch/riscv/boot/dts/spacemit/k3.dtsi:1181.20-39 Unexpected 'CLK_MPMU_I2S_SYSCLK'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 17:20:09 +02:00
Marco Elver
5eaec4cf41 arm64: Disable KCSAN instrumentation in delay.o
KCSAN relies on udelay() for injecting delays. To avoid recursively
triggering a watchpoint, where KCSAN sets up watchpoint on an address
that is accessed by udelay() in the same thread, disable instrumentation
in arm64's delay implementation.

Paul found a manifestation of this as follows:

| BUG: KCSAN: data-race in __delay / set_need_resched_current
|
| read (marked) to 0xffff000005899b48 of 8 bytes by interrupt on cpu 8:
|  __delay+0xb0/0x378
|  __udelay+0x4c/0x60
|  kcsan_setup_watchpoint+0x3b4/0x820
|  __tsan_unaligned_write4+0x228/0x26c
|  set_need_resched_current+0x138/0x1a8
|  rcu_exp_handler+0x418/0x4a0
|  __flush_smp_call_function_queue+0x36c/0x4a0
|  generic_smp_call_function_single_interrupt+0x20/0x30
|  ipi_handler+0xec/0x558
|  handle_percpu_devid_irq+0x220/0x2a0
|  generic_handle_domain_irq+0x84/0xb4
|  gic_handle_irq+0x64/0x144
|  call_on_irq_stack+0x30/0x48
|  do_interrupt_handler+0x80/0xb8
|  el1_interrupt+0x3c/0x60
|  el1h_64_irq_handler+0x18/0x24
|  el1h_64_irq+0x6c/0x70
|  smp_call_function_single+0x18c/0x25c
|  sync_rcu_exp_select_node_cpus+0x534/0x8bc
|  rcu_exp_sel_wait_wake+0x358/0xef4
|  wait_rcu_exp_gp+0x30/0x44
|  kthread_worker_fn+0x1b4/0x5dc
|  kthread+0x1d8/0x204
|  ret_from_fork+0x10/0x20
|
| write to 0xffff000005899b4c of 4 bytes by interrupt on cpu 8:
|  set_need_resched_current+0x138/0x1a8
|  [...]

This matches what is already done in arch/x86/lib/Makefile.

Reported-by: "Paul E. McKenney" <paulmck@kernel.org>
Fixes: dd03762ab6 ("arm64: Enable KCSAN")
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
2026-08-10 15:14:13 +00:00
Sean Christopherson
4fe8b4e154 KVM: selftests: Create one VM with many vCPUs for each major PMU counters test
To reduce the runtime of the PMU counters test by an order of magnitude,
create one VM per category of test (arch events, GP PMCs, fixed PMCs),
with N vCPUs per VM, where 'N' is the number of testscases to run per
category.  The vast majority of the test's runtime is spent creating VMs,
because while creating a VM only takes a few milliseconds, the total time
adds up when creating hundreds of VMs.  The only reason the test creates
so many VMs is because KVM disallows changing the virtual PMU model after
a vCPU runs, so rather than create an entirely new VM just to get a "fresh"
vCPUs, simply use a different vCPU.

On an Emerald Rapids host, this reduces the runtime from 75+ seconds to
less than 6 seconds.

Opportunistically fix a typo in the comment about unavailable_masks pointed
out by Like Xu[1].

Link: https://lore.kernel.org/all/20260625090155.6326-1-likexu@tencent.com[1]
Link: https://patch.msgid.link/20260804210046.3413149-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2026-08-10 08:04:13 -07:00
Sergey Lebedev
9b30521074
ASoC: rt1320: run the initialisation preset on the first hardware init
rt1320_io_init() applies the vendor initialisation preset only when the
amplifier's SDCA function status has FUNCTION_NEEDS_INITIALIZATION set:

	if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION)) {

Its two sibling drivers guard the same write differently, also running
the preset on the first hardware init:

  rt712-sdca.c:  if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) ||
                     (!rt712->first_hw_init)) {
  rt722-sdca.c:  if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) ||
                     (!rt722->first_hw_init)) {

On the Microsoft Surface Pro 11 (Intel) the RT1320 never sets that bit.
Its function status reads back 0x41 on every boot, cold or warm:

  rt1320-sdca sdw:0:0:025d:1320:01: rt1320_io_init amp func_status=0x41

which is NEWLY_ATTACHED | FUNCTION_HAS_BEEN_RESET: the function reports
that it has been reset and does not consider itself in need of
initialisation. Bit 5 is never set, so the preset never runs,
rt1320_vc_preset() and the MCU patch load are skipped, and the amplifier
is left unprogrammed. rt712 and rt722 would have run it via their
first_hw_init fallback.

Add the same fallback. With it rt1320_vc_preset() executes and the
amplifier reports RT1320_KR0_INT_READY=0x1f where previously it did not.

Signed-off-by: Sergey Lebedev <lsa.uz@pm.me>
Link: https://patch.msgid.link/20260804225853.31585-2-lsa.uz@pm.me
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:46:13 +01:00
Eshaan Deshmukh
977991fdc4 x86/platform/geode: Remove old TODO message about leds-net5501.c
The TODO comment in alix.c and geos.c mentions moving leds-net5501.c to
platform code. But, leds-net5501.c was already replaced by
arch/x86/platform/geode/net5501.c.

Signed-off-by: Eshaan Deshmukh <eshaan2031@icloud.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/20260810064953.2048373-1-eshaan2031@icloud.com
2026-08-10 07:39:37 -07:00
Karl Mehltretter
45f8dffc07 tick: Include ktime.h and jiffies.h in linux/tick.h
The !CONFIG_NO_HZ_COMMON stubs use ktime_add(), ktime_get() and TICK_NSEC,
but tick.h includes neither <linux/ktime.h> nor <linux/jiffies.h>. Most
configurations build only because those declarations arrive transitively.

Commit 6440966067 ("cpuset: Remove cpuset_cpu_is_isolated()") removed
<linux/cpuset.h> from <linux/sched/isolation.h>. The <linux/cpuset.h>
include chain had been satisfying these declarations before <linux/tick.h>
was parsed. Commit 8aa76aa415 ("ring-buffer: Use a housekeeping CPU to
wake up waiters") then added <linux/sched/isolation.h> to ring_buffer.c
ahead of any header which provides them. Neither change is wrong on its
own: the failure requires both and appeared in v7.0.

ARM rpc_defconfig + CONFIG_FUNCTION_TRACER fails to build:

  $ make ARCH=arm rpc_defconfig
  $ ./scripts/config -e FTRACE -e FUNCTION_TRACER
  $ make ARCH=arm olddefconfig
  $ make ARCH=arm kernel/trace/ring_buffer.o
  In file included from include/linux/sched/isolation.h:6,
                   from kernel/trace/ring_buffer.c:8:
  include/linux/tick.h: In function 'tick_nohz_get_next_hrtimer':
  include/linux/tick.h:156:9: error: implicit declaration of function
      'ktime_add'; did you mean 'size_add'?
  include/linux/tick.h:156:19: error: implicit declaration of function
      'ktime_get'; did you mean 'time_init'?
  include/linux/tick.h:156:32: error: 'TICK_NSEC' undeclared

Include the headers the file actually uses.

Fixes: 8aa76aa415 ("ring-buffer: Use a housekeeping CPU to wake up waiters")
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Assisted-by: Codex:gpt-5.6-sol
Link: https://patch.msgid.link/20260722062141.19671-1-kmehltretter@gmail.com
2026-08-10 16:38:33 +02:00
bui duc phuc
564db8b8da
ASoC: dwc: Propagate -EPROBE_DEFER from IRQ lookup
platform_get_irq_optional() never returns 0. It returns a positive IRQ
number on success or a negative error code on failure.

Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
re-probed when the interrupt resource becomes available instead of
continuing probe without an IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260806061046.25323-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:37:27 +01:00
Mark Brown
e7a5d3b04c
ASoC: Use auto-cleanup for firmware loading
Takashi Iwai <tiwai@suse.de> says:

here is a revised series of trivial patches to use the auto-cleanup
(via __free(firmware)) for firmware management.
Now compile warnings due to the mixture with goto have been addressed
for rt1320-sdw and wm2000 drivers.  Others remain identical, just took
a few review Acks.

Link: https://patch.msgid.link/20260806140006.1412298-1-tiwai@suse.de
2026-08-10 15:34:19 +01:00
Takashi Iwai
6d0a9e4df1
ASoC: SOF: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
and __free(kfree) auto-cleanups for the firmware data and the temporary
string or array.

Only the code refactoring, no functional changes.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-32-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:17 +01:00
Takashi Iwai
73a5271e10
ASoC: SDCA: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Maciej Strozek <mstrozek@opensource.cirrus.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-31-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:16 +01:00
Takashi Iwai
81ab987169
ASoC: renesas: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-30-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:15 +01:00
Takashi Iwai
c566377097
ASoC: qcom: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-29-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:15 +01:00
Takashi Iwai
a0dae90ea9
ASoC: Intel: catpt: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-28-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:13 +01:00
Takashi Iwai
6a052cf54f
ASoC: Intel: avs: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-27-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:12 +01:00
Takashi Iwai
997261a59b
ASoC: fsl: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-26-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:10 +01:00
Takashi Iwai
b6ba77dfeb
ASoC: zl38060: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-25-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:08 +01:00
Takashi Iwai
2db054a5ef
ASoC: wm2000: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-24-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:07 +01:00
Takashi Iwai
148f54aecc
ASoC: wm0010: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-23-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:05 +01:00
Takashi Iwai
e420e87ddc
ASoC: tlv320aic31xx: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Shenghao Ding <shenghao-ding@ti.com>
Cc: Kevin Lu <kevin-lu@ti.com>
Cc: Baojun Xu <baojun.xu@ti.com>
Cc: Sen Wang <sen@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-22-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:04 +01:00
Takashi Iwai
834c7c8511
ASoC: tas5805m: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-21-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:02 +01:00
Takashi Iwai
37cb22498f
ASoC: tas2781: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Shenghao Ding <shenghao-ding@ti.com>
Cc: Kevin Lu <kevin-lu@ti.com>
Cc: Baojun Xu <baojun.xu@ti.com>
Cc: Sen Wang <sen@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-20-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:34:00 +01:00
Takashi Iwai
2afbdeb483
ASoC: sma1307: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Kiseok Jo <kiseok.jo@irondevice.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-19-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-10 15:33:59 +01:00