]> git.ipfire.org Git - thirdparty/kernel/stable.git/log
thirdparty/kernel/stable.git
3 weeks agogpio: generic: move GPIO_GENERIC_ flags to the correct header
Bartosz Golaszewski [Wed, 17 Sep 2025 08:54:06 +0000 (10:54 +0200)] 
gpio: generic: move GPIO_GENERIC_ flags to the correct header

These flags are specific to gpio-mmio and belong in linux/gpio/generic.h
so move them there.

Link: https://lore.kernel.org/r/20250917-gpio-generic-flags-v1-2-69f51fee8c89@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
3 weeks agogpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_
Bartosz Golaszewski [Wed, 17 Sep 2025 08:54:05 +0000 (10:54 +0200)] 
gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_

Make the flags passed to gpio_generic_chip_init() use the same prefix as
the rest of the modernized generic GPIO chip API.

Link: https://lore.kernel.org/r/20250917-gpio-generic-flags-v1-1-69f51fee8c89@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
4 weeks agoMerge tag 'ib-mfd-gpio-input-pinctrl-pwm-v6.18' of git://git.kernel.org/pub/scm/linux...
Bartosz Golaszewski [Thu, 18 Sep 2025 10:39:22 +0000 (12:39 +0200)] 
Merge tag 'ib-mfd-gpio-input-pinctrl-pwm-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next

Pull changes from the immutable branch between MFD, GPIO, Input, Pinctrl
and PWM trees containing the GPIO driver for max7360.

4 weeks agoMerge tag 'ib-mfd-gpio-hwmon-i2c-can-rtc-watchdog-v6.18' of git://git.kernel.org...
Bartosz Golaszewski [Thu, 18 Sep 2025 10:36:22 +0000 (12:36 +0200)] 
Merge tag 'ib-mfd-gpio-hwmon-i2c-can-rtc-watchdog-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next

Pull changes from the immutable branch between MFD, GPIO, HWMON, I2C,
CAN, RTC and Watchdog trees containing GPIO support for Nuvoton NCT6694.

4 weeks agogpio: nomadik: fix the debugfs helper stub
Bartosz Golaszewski [Mon, 15 Sep 2025 09:10:07 +0000 (11:10 +0200)] 
gpio: nomadik: fix the debugfs helper stub

Commit ddeb66d2cb10 ("gpio: nomadik: don't print out global GPIO numbers
in debugfs callbacks") failed to also update the stub of the debugfs
helper for !CONFIG_DEBUG_FS. Fix the resulting build failure.

Fixes: ddeb66d2cb10 ("gpio: nomadik: don't print out global GPIO numbers in debugfs callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509132232.12viPUPB-lkp@intel.com/
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250915091007.28438-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
4 weeks agoMAINTAINERS: Add entry on MAX7360 driver
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:29 +0000 (13:57 +0200)] 
MAINTAINERS: Add entry on MAX7360 driver

Add myself as maintainer of Maxim MAX7360 driver and device-tree bindings.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-10-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agoinput: misc: Add support for MAX7360 rotary
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:28 +0000 (13:57 +0200)] 
input: misc: Add support for MAX7360 rotary

Add driver for Maxim Integrated MAX7360 rotary encoder controller,
supporting a single rotary switch.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-9-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agoinput: keyboard: Add support for MAX7360 keypad
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:27 +0000 (13:57 +0200)] 
input: keyboard: Add support for MAX7360 keypad

Add driver for Maxim Integrated MAX7360 keypad controller, providing
support for up to 64 keys, with a matrix of 8 columns and 8 rows.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-8-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agogpio: max7360: Add MAX7360 gpio support
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:26 +0000 (13:57 +0200)] 
gpio: max7360: Add MAX7360 gpio support

Add driver for Maxim Integrated MAX7360 GPIO/GPO controller.

Two sets of GPIOs are provided by the device:
- Up to 8 GPIOs, shared with the PWM and rotary encoder functionalities.
  These GPIOs also provide interrupts on input changes.
- Up to 6 GPOs, on unused keypad columns pins.

Co-developed-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-7-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agogpio: regmap: Allow to provide init_valid_mask callback
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:25 +0000 (13:57 +0200)] 
gpio: regmap: Allow to provide init_valid_mask callback

Allows to populate the gpio_regmap_config structure with
init_valid_mask() callback to set on the final gpio_chip structure.

Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-6-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agogpio: regmap: Allow to allocate regmap-irq device
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:24 +0000 (13:57 +0200)] 
gpio: regmap: Allow to allocate regmap-irq device

GPIO controller often have support for IRQ: allow to easily allocate
both gpio-regmap and regmap-irq in one operation.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-5-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agopwm: max7360: Add MAX7360 PWM support
Kamel Bouhara [Sun, 24 Aug 2025 11:57:23 +0000 (13:57 +0200)] 
pwm: max7360: Add MAX7360 PWM support

Add driver for Maxim Integrated MAX7360 PWM controller, supporting up to
8 independent PWM outputs.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Co-developed-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-4-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agopinctrl: Add MAX7360 pinctrl driver
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:22 +0000 (13:57 +0200)] 
pinctrl: Add MAX7360 pinctrl driver

Add driver for Maxim Integrated MAX7360 pinctrl on the PORT pins. Pins
can be used either for GPIO, PWM or rotary encoder functionalities.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-3-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agomfd: Add max7360 support
Kamel Bouhara [Sun, 24 Aug 2025 11:57:21 +0000 (13:57 +0200)] 
mfd: Add max7360 support

Add core driver to support MAX7360 i2c chip, multi function device
with keypad, GPIO, PWM, GPO and rotary encoder submodules.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Co-developed-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-2-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agodt-bindings: mfd: gpio: Add MAX7360
Mathieu Dubois-Briand [Sun, 24 Aug 2025 11:57:20 +0000 (13:57 +0200)] 
dt-bindings: mfd: gpio: Add MAX7360

Add device tree bindings for Maxim Integrated MAX7360 device with
support for keypad, rotary, gpios and pwm functionalities.

Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Link: https://lore.kernel.org/r/20250824-mdb-max7360-support-v14-1-435cfda2b1ea@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agortc: Add Nuvoton NCT6694 RTC support
Ming Yu [Fri, 12 Sep 2025 09:19:52 +0000 (17:19 +0800)] 
rtc: Add Nuvoton NCT6694 RTC support

This driver supports RTC functionality for NCT6694 MFD device
based on USB interface.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-8-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agohwmon: Add Nuvoton NCT6694 HWMON support
Ming Yu [Fri, 12 Sep 2025 09:19:51 +0000 (17:19 +0800)] 
hwmon: Add Nuvoton NCT6694 HWMON support

This driver supports Hardware monitor functionality for NCT6694 MFD
device based on USB interface.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-7-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agowatchdog: Add Nuvoton NCT6694 WDT support
Ming Yu [Fri, 12 Sep 2025 09:19:50 +0000 (17:19 +0800)] 
watchdog: Add Nuvoton NCT6694 WDT support

This driver supports Watchdog timer functionality for NCT6694 MFD
device based on USB interface.

Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-6-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agocan: Add Nuvoton NCT6694 CANFD support
Ming Yu [Fri, 12 Sep 2025 09:19:49 +0000 (17:19 +0800)] 
can: Add Nuvoton NCT6694 CANFD support

This driver supports Socket CANFD functionality for NCT6694 MFD
device based on USB interface.

Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-5-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agoi2c: Add Nuvoton NCT6694 I2C support
Ming Yu [Fri, 12 Sep 2025 09:19:48 +0000 (17:19 +0800)] 
i2c: Add Nuvoton NCT6694 I2C support

This driver supports I2C adapter functionality for NCT6694 MFD
device based on USB interface.

Each I2C controller uses the default baudrate of 100kHz, which
can be overridden via module parameters.

Acked-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-4-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agogpio: Add Nuvoton NCT6694 GPIO support
Ming Yu [Fri, 12 Sep 2025 09:19:47 +0000 (17:19 +0800)] 
gpio: Add Nuvoton NCT6694 GPIO support

This driver supports GPIO and IRQ functionality for NCT6694 MFD
device based on USB interface.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-3-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agomfd: Add core driver for Nuvoton NCT6694
Ming Yu [Fri, 12 Sep 2025 09:19:46 +0000 (17:19 +0800)] 
mfd: Add core driver for Nuvoton NCT6694

The Nuvoton NCT6694 provides an USB interface to the host to
access its features.

Sub-devices can use the USB functions nct6694_read_msg() and
nct6694_write_msg() to issue a command. They can also request
interrupt that will be called when the USB device receives its
interrupt pipe.

Signed-off-by: Ming Yu <a0282524688@gmail.com>
Link: https://lore.kernel.org/r/20250912091952.1169369-2-a0282524688@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
4 weeks agodt-bindings: gpio: fix trivial-gpio's schema id
Ioana Ciornei [Fri, 12 Sep 2025 16:59:16 +0000 (19:59 +0300)] 
dt-bindings: gpio: fix trivial-gpio's schema id

In case the trivial-gpio schema is referenced through a $ref like
/schemas/trivial-gpio.yaml to match its current schema ID, the following
error message is displayed:

Error in referenced schema matching $id: http://devicetree.org/schemas/trivial-gpio.yaml
Tried these paths (check schema $id if path is wrong):
/path/to/linux/Documentation/devicetree/bindings/trivial-gpio.yaml
/path/to/dtchema/schemas/trivial-gpio.yaml

Fix this by adding the 'gpio' folder to the schema's ID to match its
file path.

Fixes: f03a7f20b23c ("dt-bindings: gpio: Create a trivial GPIO schema")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250912165916.3098215-1-ioana.ciornei@nxp.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: move gpio-mmio-specific fields out of struct gpio_chip
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:51 +0000 (09:12 +0200)] 
gpio: move gpio-mmio-specific fields out of struct gpio_chip

With all users of bgpio_init() converted to using the modernized generic
GPIO chip API, we can now move the gpio-mmio-specific fields out of
struct gpio_chip and into the dedicated struct gpio_generic_chip. To
that end: adjust the gpio-mmio driver to the new layout, update the
docs, etc.

The changes in gpio-mlxbf2.c and gpio-mpc8xxx.c are here and not in their
respective conversion commits because the former passes the address of
the generic chip's lock to the __releases() annotation and we cannot
really hide it while gpio-mpc8xxx.c accesses the shadow registers in a
driver-specific workaround and there's no reason to make them available
in a public API.

Also: drop the relevant task from TODO as it's now done.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-15-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: mmio: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:50 +0000 (09:12 +0200)] 
gpio: mmio: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-14-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: sodaville: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:49 +0000 (09:12 +0200)] 
gpio: sodaville: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-13-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: spacemit-k1: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:48 +0000 (09:12 +0200)] 
gpio: spacemit-k1: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Yixun Lan <dlan@gentoo.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-12-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: sifive: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:47 +0000 (09:12 +0200)] 
gpio: sifive: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-11-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: menz127: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:46 +0000 (09:12 +0200)] 
gpio: menz127: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-10-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: mt7621: use the generic GPIO chip lock for IRQ handling
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:45 +0000 (09:12 +0200)] 
gpio: mt7621: use the generic GPIO chip lock for IRQ handling

This driver uses its own spinlock in interrupt routines while the
generic GPIO chip callbacks use a separate one. This is, of course, racy
so use the fact that the lock in generic GPIO chip is also a spinlock and
convert the interrupt handling functions in this module to using the
provided generic GPIO chip locking API.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-9-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: mt7621: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:44 +0000 (09:12 +0200)] 
gpio: mt7621: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-8-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: brcmstb: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:43 +0000 (09:12 +0200)] 
gpio: brcmstb: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Acked-by: Doug Berger <opendmb@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-7-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: xgene-sb: use generic GPIO chip register read and write APIs
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:42 +0000 (09:12 +0200)] 
gpio: xgene-sb: use generic GPIO chip register read and write APIs

The conversion to using the modernized generic GPIO chip API was
incomplete without also converting the direct calls to write/read_reg()
callbacks. Use the provided wrappers from linux/gpio/generic.h.

Fixes: 38d98a822c14 ("gpio: xgene-sb: use new generic GPIO chip API")
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-6-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ath79: use the generic GPIO chip lock for IRQ handling
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:41 +0000 (09:12 +0200)] 
gpio: ath79: use the generic GPIO chip lock for IRQ handling

This driver uses its own raw spinlock in interrupt routines while the
generic GPIO chip callbacks use a separate one. This is, of course, racy
so use the fact that the lock in generic GPIO chip is also a raw
spinlock and convert the interrupt handling functions in this module to
using the provided generic GPIO chip locking API.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-5-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ath79: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:40 +0000 (09:12 +0200)] 
gpio: ath79: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-4-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: hlwd: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:39 +0000 (09:12 +0200)] 
gpio: hlwd: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-3-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: loongson1: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:38 +0000 (09:12 +0200)] 
gpio: loongson1: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-2-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: loongson1: allow building the module with COMPILE_TEST enabled
Bartosz Golaszewski [Wed, 10 Sep 2025 07:12:37 +0000 (09:12 +0200)] 
gpio: loongson1: allow building the module with COMPILE_TEST enabled

Increase build coverage by allowing the module to be built with
COMPILE_TEST=y.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250910-gpio-mmio-gpio-conv-part4-v2-1-f3d1a4c57124@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpiolib: add a common prefix to GPIO descriptor flags
Bartosz Golaszewski [Tue, 9 Sep 2025 12:28:43 +0000 (14:28 +0200)] 
gpiolib: add a common prefix to GPIO descriptor flags

While these flags are private within drivers/gpio/, when looking at the
code, it's not really clear they are GPIO-specific. Since these are GPIO
descriptor flags, prepend their names with a common "GPIOD" prefix.

While at it: update the flags' docs: make spelling consistent, correct
outdated information, etc.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250909-rename-gpio-flags-v1-1-bda208a40856@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: use more common syntax for compound literals
Bartosz Golaszewski [Wed, 10 Sep 2025 07:25:47 +0000 (09:25 +0200)] 
gpio: use more common syntax for compound literals

The (typeof(foo)) construct is unusual in the kernel, use a more typical
syntax by explicitly spelling out the type.

Link: https://lore.kernel.org/all/20250909-gpio-mmio-gpio-conv-part4-v1-13-9f723dc3524a@linaro.org/
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://lore.kernel.org/r/20250910-make-compound-literals-normal-again-v1-3-076ee7738a0b@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: loongson-64bit: Fix a less than zero check on an unsigned int struct field
Colin Ian King [Tue, 9 Sep 2025 19:03:56 +0000 (20:03 +0100)] 
gpio: loongson-64bit: Fix a less than zero check on an unsigned int struct field

Currently the error check from the call to platform_get_irq is always
false because an unsigned int chip->irq.parents[i] is being used to
to perform the less than zero error check. Fix this by using the int
variable ret to perform the check.

Fixes: 03c146cb6cd1 ("gpio: loongson-64bit: Add support for Loongson-2K0300 SoC")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Yao Zi <ziyao@disroot.org>
Link: https://lore.kernel.org/r/20250909190356.870000-1-colin.i.king@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: loongson-64bit: Remove unneeded semicolon
Chen Ni [Tue, 9 Sep 2025 06:59:13 +0000 (14:59 +0800)] 
gpio: loongson-64bit: Remove unneeded semicolon

Remove unnecessary semicolons reported by Coccinelle/coccicheck and the
semantic patch at scripts/coccinelle/misc/semicolon.cocci.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20250909065913.4011133-1-nichen@iscas.ac.cn
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: pisosr: Use devm_mutex_init()
Christophe JAILLET [Sun, 7 Sep 2025 13:25:38 +0000 (15:25 +0200)] 
gpio: pisosr: Use devm_mutex_init()

Use devm_mutex_init() instead of hand-writing it.

This saves some LoC, improves readability and saves some space in the
generated .o file.

Before:
======
   text    data     bss     dec     hex filename
   8431    1808     192   10431    28bf drivers/gpio/gpio-pisosr.o

After:
=====
   text    data     bss     dec     hex filename
   8112    1736     192   10040    2738 drivers/gpio/gpio-pisosr.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/01910ebdaba7d8d0cdc4ac60eb70da8e29cb85f1.1757251512.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: loongson-64bit: Add support for Loongson-2K0300 SoC
Yao Zi [Thu, 4 Sep 2025 01:34:37 +0000 (01:34 +0000)] 
gpio: loongson-64bit: Add support for Loongson-2K0300 SoC

This controller's input and output logic is similar to previous
generations of SoCs. Additionally, it's capable of interrupt masking,
and could be configured to detect levels and edges, and is supplied with
a distinct reset signal.

The interrupt functionality is implemented through an irqchip, whose
operations are written with previous generation SoCs in mind and could
be reused. Since all Loongson SoCs with similar interrupt capability
(LS2K1500, LS2K2000) support byte-control mode, these operations are for
byte-control mode only for simplicity.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250904013438.2405-3-ziyao@disroot.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agodt-bindings: gpio: loongson: Document GPIO controller of LS2K0300 SoC
Yao Zi [Thu, 4 Sep 2025 01:34:36 +0000 (01:34 +0000)] 
dt-bindings: gpio: loongson: Document GPIO controller of LS2K0300 SoC

Loongson-2K0300 ships a GPIO controller whose input/output control logic
is similar to previous generation of SoCs. Additionally, it acts as an
interrupt-controller supporting both level and edge interrupts and has a
distinct reset signal.

Describe its compatible in devicetree. We enlarge the maximum value of
ngpios to 128, since the controller technically supports at most 128
pins, although only 106 are routed out of the package. Properties for
interrupt-controllers and resets are introduced and limited as LS2K0300
only.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250904013438.2405-2-ziyao@disroot.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: Kconfig: Update help for GPIO_PCA953X
Akhilesh Patil [Thu, 4 Sep 2025 15:16:09 +0000 (20:46 +0530)] 
gpio: Kconfig: Update help for GPIO_PCA953X

Update help description with supported ICs from gpio-pca953x.c
Include missing IC names.

Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Link: https://lore.kernel.org/r/aLmtOWjAWPtWe/gH@bhairav-test.ee.iitb.ac.in
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: mlxbf3: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:16 +0000 (10:00 +0200)] 
gpio: mlxbf3: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-12-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ep93xx: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:15 +0000 (10:00 +0200)] 
gpio: ep93xx: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-11-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ep93xx: order includes alphabetically
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:14 +0000 (10:00 +0200)] 
gpio: ep93xx: order includes alphabetically

For better readability and easier maintenance, order the includes
alphabetically.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-10-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ep93xx: allow building the module with COMPILE_TEST enabled
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:13 +0000 (10:00 +0200)] 
gpio: ep93xx: allow building the module with COMPILE_TEST enabled

Increase build coverage by allowing the module to be built with
COMPILE_TEST=y.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-9-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: mlxbf: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:12 +0000 (10:00 +0200)] 
gpio: mlxbf: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-8-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: tb10x: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:11 +0000 (10:00 +0200)] 
gpio: tb10x: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-7-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: tb10x: allow building the module with COMPILE_TEST=y
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:10 +0000 (10:00 +0200)] 
gpio: tb10x: allow building the module with COMPILE_TEST=y

Increase build coverage by allowing the module to be built with
COMPILE_TEST=y. We need an actual prompt entry in this case so add it.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-6-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: tb10x: order includes alphabetically
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:09 +0000 (10:00 +0200)] 
gpio: tb10x: order includes alphabetically

For better readability and easier maintenance, order the includes
alphabetically.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-5-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: blzp1600: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:08 +0000 (10:00 +0200)] 
gpio: blzp1600: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-4-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: idt3243x: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:07 +0000 (10:00 +0200)] 
gpio: idt3243x: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-3-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ixp4xx: use new generic GPIO chip API
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:06 +0000 (10:00 +0200)] 
gpio: ixp4xx: use new generic GPIO chip API

Convert the driver to using the new generic GPIO chip interfaces from
linux/gpio/generic.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-2-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agogpio: ixp4xx: allow building the module with COMPILE_TEST enabled
Bartosz Golaszewski [Wed, 3 Sep 2025 08:00:05 +0000 (10:00 +0200)] 
gpio: ixp4xx: allow building the module with COMPILE_TEST enabled

Increase build coverage by allowing the module to be built with
COMPILE_TEST=y.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250903-gpio-mmio-gpio-conv-part3-v1-1-ff346509f408@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
5 weeks agoMerge tag 'v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Bartosz Golaszewski [Mon, 8 Sep 2025 07:16:23 +0000 (09:16 +0200)] 
Merge tag 'v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next

Linux 6.17-rc5

6 weeks agoLinux 6.17-rc5 v6.17-rc5
Linus Torvalds [Sun, 7 Sep 2025 21:22:57 +0000 (14:22 -0700)] 
Linux 6.17-rc5

6 weeks agoMerge tag 'i2c-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 7 Sep 2025 19:30:31 +0000 (12:30 -0700)] 
Merge tag 'i2c-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:

 - i801: drop superfluous WDT entry for Birch

 - rtl9300:
    - fix channel number check in probe
    - check data length boundaries in xfer
    - drop broken SMBus quick operation

* tag 'i2c-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: rtl9300: remove broken SMBus Quick operation support
  i2c: rtl9300: ensure data length is within supported range
  i2c: rtl9300: fix channel number bound check
  i2c: i801: Hide Intel Birch Stream SoC TCO WDT

6 weeks agoMerge tag 'edac_urgent_for_v6.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 7 Sep 2025 15:41:32 +0000 (08:41 -0700)] 
Merge tag 'edac_urgent_for_v6.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fix from Borislav Petkov:

 - Remove a misplaced dma_free_coherent() call in altera_edac

* tag 'edac_urgent_for_v6.17_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/altera: Delete an inappropriate dma_free_coherent() call

6 weeks agoMerge tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 7 Sep 2025 15:29:44 +0000 (08:29 -0700)] 
Merge tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix a severe slowdown regression in the timer vDSO code related to the
  while() loop in __iter_div_u64_rem(), when the AUX-clock is enabled"

* tag 'timers-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  vdso/vsyscall: Avoid slow division loop in auxiliary clock update

6 weeks agoMerge tag 'locking-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 7 Sep 2025 15:26:28 +0000 (08:26 -0700)] 
Merge tag 'locking-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
 "Fix an 'allocation from atomic context' regression in the futex
  vmalloc variant"

* tag 'locking-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Move futex_hash_free() back to __mmput()

6 weeks agoMerge tag 'perf-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 7 Sep 2025 15:24:20 +0000 (08:24 -0700)] 
Merge tag 'perf-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf event fix from Ingo Molnar:
 "Fix regression where PERF_EVENT_IOC_REFRESH counters miss a PMU-stop"

* tag 'perf-urgent-2025-09-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix the POLL_HUP delivery breakage

6 weeks agoMerge tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 7 Sep 2025 15:15:56 +0000 (08:15 -0700)] 
Merge tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - LTO fix for clang when building with CONFIG_CMODEL_MEDLOW

 - Fix for ACPI CPPC CSR read/write return values

 - Several fixes for incorrect access widths in thread_info.cpu reads

 - Fix an issue in __put_user_nocheck() that was causing the glibc
   tst-socket-timestamp test to fail

 - Initialize struct kexec_buf records in several kexec-related
   functions, which were generating UBSAN warnings

 - Two fixes for sparse warnings

* tag 'riscv-for-linus-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: Fix sparse warning about different address spaces
  riscv: Fix sparse warning in __get_user_error()
  riscv: kexec: Initialize kexec_buf struct
  riscv: use lw when reading int cpu in asm_per_cpu
  riscv, bpf: use lw when reading int cpu in bpf_get_smp_processor_id
  riscv, bpf: use lw when reading int cpu in BPF_MOV64_PERCPU_REG
  riscv: uaccess: fix __put_user_nocheck for unaligned accesses
  riscv: use lw when reading int cpu in new_vmalloc_check
  ACPI: RISC-V: Fix FFH_CPPC_CSR error handling
  riscv: Only allow LTO with CMODEL_MEDANY

6 weeks agoMerge tag 'rust-fixes-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda...
Linus Torvalds [Sat, 6 Sep 2025 19:33:09 +0000 (12:33 -0700)] 
Merge tag 'rust-fixes-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust fixes from Miguel Ojeda:

 - Two changes to prepare for the future Rust 1.91.0 release (expected
   2025-10-30, currently in nightly): a target specification format
   change and a renamed, soon-to-be-stabilized 'core' function.

* tag 'rust-fixes-6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: support Rust >= 1.91.0 target spec
  rust: use the new name Location::file_as_c_str() in Rust >= 1.91.0

6 weeks agoMerge tag 'i2c-host-fixes-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Wolfram Sang [Sat, 6 Sep 2025 08:17:35 +0000 (10:17 +0200)] 
Merge tag 'i2c-host-fixes-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current

i2c-host-fixes for v6.17-rc5

- i801: fix device IDs
- in rtl9300:
  - fix channel number check in probe
  - check data length boundaries in xfer
  - drop unsupported SMBus quick operation

6 weeks agoMerge tag 'perf-tools-fixes-for-v6.17-2025-09-05' of git://git.kernel.org/pub/scm...
Linus Torvalds [Fri, 5 Sep 2025 22:01:46 +0000 (15:01 -0700)] 
Merge tag 'perf-tools-fixes-for-v6.17-2025-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools fixes from Namhyung Kim:
 "Fixes for use-after-free that resulted in segfaults after merging the
  bpf tree.

  Also a couple of build and test fixes"

* tag 'perf-tools-fixes-for-v6.17-2025-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  perf symbol-elf: Add support for the block argument for libbfd
  perf test: Checking BPF metadata collection fails on version string
  perf tests: Fix "PE file support" test build
  perf bpf-utils: Harden get_bpf_prog_info_linear
  perf bpf-utils: Constify bpil_array_desc
  perf bpf-event: Fix use-after-free in synthesis

6 weeks agoriscv: Fix sparse warning about different address spaces
Alexandre Ghiti [Wed, 3 Sep 2025 18:53:09 +0000 (18:53 +0000)] 
riscv: Fix sparse warning about different address spaces

We did not propagate the __user attribute of the pointers in
__get_kernel_nofault() and __put_kernel_nofault(), which results in
sparse complaining:

>> mm/maccess.c:41:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got unsigned long long [usertype] * @@
   mm/maccess.c:41:17: sparse:     expected void const [noderef] __user *from
   mm/maccess.c:41:17: sparse:     got unsigned long long [usertype] *

So fix this by correctly casting those pointers.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508161713.RWu30Lv1-lkp@intel.com/
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Cyril Bur <cyrilbur@tenstorrent.com>
Link: https://lore.kernel.org/r/20250903-dev-alex-sparse_warnings_v1-v1-2-7e6350beb700@rivosinc.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv: Fix sparse warning in __get_user_error()
Alexandre Ghiti [Wed, 3 Sep 2025 18:53:08 +0000 (18:53 +0000)] 
riscv: Fix sparse warning in __get_user_error()

We used to assign 0 to x without an appropriate cast which results in
sparse complaining when x is a pointer:

>> block/ioctl.c:72:39: sparse: sparse: Using plain integer as NULL pointer

So fix this by casting 0 to the correct type of x.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508062321.gHv4kvuY-lkp@intel.com/
Fixes: f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Cyril Bur <cyrilbur@tenstorrent.com>
Link: https://lore.kernel.org/r/20250903-dev-alex-sparse_warnings_v1-v1-1-7e6350beb700@rivosinc.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv: kexec: Initialize kexec_buf struct
Breno Leitao [Wed, 27 Aug 2025 10:42:22 +0000 (03:42 -0700)] 
riscv: kexec: Initialize kexec_buf struct

The kexec_buf structure was previously declared without initialization.
commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.

This is also triggering a UBSAN warning when the uninitialized data was
accessed:

------------[ cut here ]------------
UBSAN: invalid-load in ./include/linux/kexec.h:210:10
load of value 252 is not a valid value for type '_Bool'

Zero-initializing kexec_buf at declaration ensures all fields are
cleanly set, preventing future instances of uninitialized memory being
used.

Fixes: bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
Signed-off-by: Breno Leitao <leitao@debian.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250827-kbuf_all-v1-2-1df9882bb01a@debian.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv: use lw when reading int cpu in asm_per_cpu
Radim Krčmář [Fri, 25 Jul 2025 16:54:10 +0000 (18:54 +0200)] 
riscv: use lw when reading int cpu in asm_per_cpu

REG_L is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: be97d0db5f44 ("riscv: VMAP_STACK overflow detection thread-safe")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Link: https://lore.kernel.org/r/20250725165410.2896641-5-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv, bpf: use lw when reading int cpu in bpf_get_smp_processor_id
Radim Krčmář [Tue, 12 Aug 2025 09:02:56 +0000 (11:02 +0200)] 
riscv, bpf: use lw when reading int cpu in bpf_get_smp_processor_id

emit_ld is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: 2ddec2c80b44 ("riscv, bpf: inline bpf_get_smp_processor_id()")
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20250812090256.757273-4-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv, bpf: use lw when reading int cpu in BPF_MOV64_PERCPU_REG
Radim Krčmář [Tue, 12 Aug 2025 09:02:55 +0000 (11:02 +0200)] 
riscv, bpf: use lw when reading int cpu in BPF_MOV64_PERCPU_REG

emit_ld is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: 19c56d4e5be1 ("riscv, bpf: add internal-only MOV instruction to resolve per-CPU addrs")
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Tested-by: Björn Töpel <bjorn@rivosinc.com> # QEMU
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250812090256.757273-3-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv: uaccess: fix __put_user_nocheck for unaligned accesses
Aurelien Jarno [Thu, 24 Jul 2025 22:08:52 +0000 (00:08 +0200)] 
riscv: uaccess: fix __put_user_nocheck for unaligned accesses

The type of the value to write should be determined by the size of the
destination, not by the value itself, which may be a constant. This
aligns the behavior with x86_64, where __typeof__(*(__gu_ptr)) is used
to infer the correct type.

This fixes an issue in put_cmsg, which was only writing 4 out of 8
bytes to the cmsg_len field, causing the glibc tst-socket-timestamp test
to fail.

Fixes: ca1a66cdd685 ("riscv: uaccess: do not do misaligned accesses in get/put_user()")
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250724220853.1969954-1-aurelien@aurel32.net
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv: use lw when reading int cpu in new_vmalloc_check
Radim Krčmář [Fri, 25 Jul 2025 16:54:09 +0000 (18:54 +0200)] 
riscv: use lw when reading int cpu in new_vmalloc_check

REG_L is wrong, because thread_info.cpu is 32-bit, not xlen-bit wide.
The struct currently has a hole after cpu, so little endian accesses
seemed fine.

Fixes: 503638e0babf ("riscv: Stop emitting preventive sfence.vma for new vmalloc mappings")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Link: https://lore.kernel.org/r/20250725165410.2896641-4-rkrcmar@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 5 Sep 2025 21:26:03 +0000 (14:26 -0700)] 
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Obvious driver patch plus update to sr to add back rotational media
  flag since CDROMS are rotational"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sr: Reinstate rotational media flag
  scsi: lpfc: Fix buffer free/clear order in deferred receive path

6 weeks agoMerge tag 'spi-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Fri, 5 Sep 2025 20:29:31 +0000 (13:29 -0700)] 
Merge tag 'spi-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "The largest batch of fixes here is a series of fixes for the Freescale
  LPSPI driver which James Clark pulled out of their BSP while looking
  at support for the NXP S32G version of the controller.

  The majority of this turned out to be bug fixes that affect existing
  systems with the actual S32G support being just a small quirk that
  would be unremarkable by itself, the whole series has had a good
  amount of testing and review and the individual patches are all pretty
  straightforward by themselves.

  We also have a few other driver specific fixes, including a relatively
  large but simple one for the Cadence QuadSPI driver"

* tag 'spi-fix-v6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-qpic-snand: unregister ECC engine on probe error and device remove
  spi: cadence-quadspi: Implement refcount to handle unbind during busy
  spi: spi-fsl-lpspi: Add compatible for S32G
  spi: spi-fsl-lpspi: Parameterize reading num-cs from hardware
  spi: spi-fsl-lpspi: Treat prescale_max == 0 as no erratum
  spi: spi-fsl-lpspi: Constify devtype datas
  dt-bindings: lpspi: Document support for S32G
  spi: spi-fsl-lpspi: Clear status register after disabling the module
  spi: spi-fsl-lpspi: Reset FIFO and disable module on transfer abort
  spi: spi-fsl-lpspi: Set correct chip-select polarity bit
  spi: spi-fsl-lpspi: Fix transmissions when using CONT
  spi: microchip-core-qspi: stop checking viability of op->max_freq in supports_op callback

6 weeks agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Fri, 5 Sep 2025 20:11:10 +0000 (13:11 -0700)] 
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Incorrect __BITS_PER_LONG as 64 when compiling the compat vDSO

 - Unreachable PLT for ftrace_caller() in a module's .init.text
   following past reworking of the module VA range selection

 - Memory leak in the ACPI iort_rmr_alloc_sids() after a failed
   krealloc_array()

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE
  ACPI/IORT: Fix memory leak in iort_rmr_alloc_sids()
  arm64: uapi: Provide correct __BITS_PER_LONG for the compat vDSO

6 weeks agoMerge tag 'audit-pr-20250905' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoor...
Linus Torvalds [Fri, 5 Sep 2025 19:35:25 +0000 (12:35 -0700)] 
Merge tag 'audit-pr-20250905' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit

Pull audit fix from Paul Moore:
 "A single small audit patch to fix a potential out-of-bounds read
  caused by a negative array index when comparing paths"

* tag 'audit-pr-20250905' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: fix out-of-bounds read in audit_compare_dname_path()

6 weeks agoMerge tag '6.17-RC4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 5 Sep 2025 18:14:23 +0000 (11:14 -0700)] 
Merge tag '6.17-RC4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Fix two potential NULL pointer references

 - Two debugging improvements (to help debug recent issues) a new
   tracepoint, and minor improvement to DebugData

 - Trivial comment cleanup

* tag '6.17-RC4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: prevent NULL pointer dereference in UTF16 conversion
  smb: client: show negotiated cipher in DebugData
  smb: client: add new tracepoint to trace lease break notification
  smb: client: fix spellings in comments
  smb: client: Fix NULL pointer dereference in cifs_debug_dirs_proc_show()

6 weeks agoMerge tag 'hwmon-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 5 Sep 2025 18:08:06 +0000 (11:08 -0700)] 
Merge tag 'hwmon-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - ina238: Various value range fixes when writing limit attributes

 - mlxreg-fan: Prevent fans from getting stuck at 0 RPM

* tag 'hwmon-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ina238) Correctly clamp power limits
  hwmon: (ina238) Correctly clamp shunt voltage limit
  hwmon: (ina238) Correctly clamp temperature
  hwmon: mlxreg-fan: Prevent fans from getting stuck at 0 RPM

6 weeks agoMerge tag 'gpio-fixes-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 5 Sep 2025 17:33:46 +0000 (10:33 -0700)] 
Merge tag 'gpio-fixes-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix GPIO submenu regression in Kconfig

 - fix make clean under tools/gpio/

* tag 'gpio-fixes-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  tools: gpio: remove the include directory on make clean
  gpio: fix GPIO submenu in Kconfig

6 weeks agoMerge tag 'platform-drivers-x86-v6.17-3' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 5 Sep 2025 17:28:48 +0000 (10:28 -0700)] 
Merge tag 'platform-drivers-x86-v6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:

 - acer-wmi: Stop using ACPI bitmap for platform profile choices

 - amd/hfi: Fix pcct_tbl leak

 - amd/pmc: Add TUXEDO IB Pro Gen10 AMD to spurious 8042 quirks

 - asus-wmi:
     - Fix registration races
     - Fix ROG button mapping, tablet mode on ASUS ROG Z13
     - Support more keys on ExpertBook B9

 - hp-wmi: Add support for Fn+P hotkey

 - intel/pmc: Add Bartlett Lake support

 - intel/power-domains: Use topology_logical_package_id() for package ID

* tag 'platform-drivers-x86-v6.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86/intel: power-domains: Use topology_logical_package_id() for package ID
  platform/x86: acer-wmi: Stop using ACPI bitmap for platform profile choices
  platform/x86: hp-wmi: Add support for Fn+P hotkey
  platform/x86/intel/pmc: Add Bartlett Lake support to intel_pmc_core
  platform/x86: asus-wmi: Fix racy registrations
  platform/x86/amd/pmc: Add TUXEDO IB Pro Gen10 AMD to spurious 8042 quirks list
  platform/x86: asus-wmi: map more keys on ExpertBook B9
  platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13
  platform/x86: asus-wmi: Remove extra keys from ignore_key_wlan quirk
  platform/x86/amd: hfi: Fix pcct_tbl leak in amd_hfi_metadata_parser()

6 weeks agoMerge tag 'block-6.17-20250905' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 5 Sep 2025 17:25:57 +0000 (10:25 -0700)] 
Merge tag 'block-6.17-20250905' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Keith
     - Fix protection information ref tag for device side gen/strip
       (Christoph)

 - MD pull request via Yu
     - fix data loss for writemostly in raid1 (Yu Kuai)
     - fix potentional data loss by skipping recovery (Li Nan)

* tag 'block-6.17-20250905' of git://git.kernel.dk/linux:
  md: prevent incorrect update of resync/recovery offset
  md/raid1: fix data lost for writemostly rdev
  nvme: fix PI insert on write

6 weeks agoarm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAM...
panfan [Fri, 5 Sep 2025 03:22:36 +0000 (20:22 -0700)] 
arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE

On arm64, it has been possible for a module's sections to be placed more
than 128M away from each other since commit:

  commit 3e35d303ab7d ("arm64: module: rework module VA range selection")

Due to this, an ftrace callsite in a module's .init.text section can be
out of branch range for the module's ftrace PLT entry (in the module's
.text section). Any attempt to enable tracing of that callsite will
result in a BRK being patched into the callsite, resulting in a fatal
exception when the callsite is later executed.

Fix this by adding an additional trampoline for .init.text, which will
be within range.

No additional trampolines are necessary due to the way a given
module's executable sections are packed together. Any executable
section beginning with ".init" will be placed in MOD_INIT_TEXT,
and any other executable section, including those beginning with ".exit",
 will be placed in MOD_TEXT.

Fixes: 3e35d303ab7d ("arm64: module: rework module VA range selection")
Cc: <stable@vger.kernel.org> # 6.5.x
Signed-off-by: panfan <panfan@qti.qualcomm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250905032236.3220885-1-panfan@qti.qualcomm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
6 weeks agoMerge tag 'drm-fixes-2025-09-05' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 5 Sep 2025 15:50:25 +0000 (08:50 -0700)] 
Merge tag 'drm-fixes-2025-09-05' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly drm fixes roundup, nouveau has two fixes for fence/irq racing
  problems that should fix a bunch of instability in userspace.

  Otherwise amdgpu along with some single fixes to bridge, xe, ivpu.

  Looks about usual for this time in the release.

  scheduler:
   - fix race in unschedulable tracepoint

  bridge:
   - ti-sn65dsi86: fix REFCLK setting

  xe:
   - Fix incorrect migration of backed-up object to VRAM

  amdgpu:
   - UserQ fixes
   - MES 11 fix
   - eDP/LVDS fix
   - Fix non-DC audio clean up
   - Fix duplicate cursor issue
   - Fix error path in PSP init

  nouveau:
   - fix nonstall interrupt handling
   - fix race on fence vs irq emission
   - update MAINTAINERS entry

  ivpu:
   - prevent recovery work during device remove"

* tag 'drm-fixes-2025-09-05' of https://gitlab.freedesktop.org/drm/kernel:
  drm/amd/amdgpu: Fix missing error return on kzalloc failure
  drm/bridge: ti-sn65dsi86: fix REFCLK setting
  MAINTAINERS: Update git entry for nouveau
  drm/xe: Fix incorrect migration of backed-up object to VRAM
  drm/sched: Fix racy access to drm_sched_entity.dependency
  accel/ivpu: Prevent recovery work from being queued during device removal
  nouveau: Membar before between semaphore writes and the interrupt
  nouveau: fix disabling the nonstall irq due to storm code
  drm/amd/display: Clear the CUR_ENABLE register on DCN314 w/out DPP PG
  drm/amdgpu: drop hw access in non-DC audio fini
  drm/amd: Re-enable common modes for eDP and LVDS
  drm/amdgpu/mes11: make MES_MISC_OP_CHANGE_CONFIG failure non-fatal
  drm/amdgpu/sdma: bump firmware version checks for user queue support

6 weeks agoMerge tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 5 Sep 2025 14:57:07 +0000 (07:57 -0700)] 
Merge tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library fixes from Eric Biggers:
 "Fix a regression caused by my commits that reimplemented the sha1,
  sha256, and sha512 crypto_shash algorithms on top of the library API.
  Specifically, the export_core and import_core methods stopped being
  supported, which broke some hardware offload drivers (such as qat)
  that recently started depending on these for fallback functionality.

  Later I'd like to make these drivers just use the library API for
  their fallback. Then these methods won't be needed anymore. But for
  now, this fixes the regression for 6.17"

* tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  crypto: sha512 - Implement export_core() and import_core()
  crypto: sha256 - Implement export_core() and import_core()
  crypto: sha1 - Implement export_core() and import_core()

6 weeks agoMerge tag 'pcmcia-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux
Linus Torvalds [Fri, 5 Sep 2025 14:52:44 +0000 (07:52 -0700)] 
Merge tag 'pcmcia-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux

Pull PCMCIA fixes and cleanups from Dominik Brodowski:
 "A number of minor PCMCIA bugfixes and cleanups, including the removal
  of unused code paths"

[ Dominik suggested this might be 6.18 material, but having looked
  through this, it looks appropriate early: minor trivial fixes and then
  one slightly bigger patch that removes dead code  - Linus ]

* tag 'pcmcia-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
  pcmcia: Add error handling for add_interval() in do_validate_mem()
  pcmcia: cs: Remove unused pcmcia_get_socket_by_nr
  pcmcia: omap: Add missing check for platform_get_resource
  pcmcia: Use str_off_on() and str_yes_no() helpers
  pcmcia: remove PCCARD_IODYN
  pcmcia: ds: Emphasize "really" epizeuxis
  pcmcia: Fix a NULL pointer dereference in __iodyn_find_io_region()
  pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch

6 weeks agoMerge tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdrai...
Jens Axboe [Fri, 5 Sep 2025 11:08:27 +0000 (05:08 -0600)] 
Merge tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into block-6.17

Pull MD fixes from Yu:

"- fix data loss for writemostly in raid1, by Yu Kuai;
 - fix potentional data lost by skipping recovery, by Li Nan;"

* tag 'md-6.17-20250905' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux:
  md: prevent incorrect update of resync/recovery offset
  md/raid1: fix data lost for writemostly rdev

6 weeks agoperf symbol-elf: Add support for the block argument for libbfd
Ian Rogers [Thu, 4 Sep 2025 16:17:31 +0000 (09:17 -0700)] 
perf symbol-elf: Add support for the block argument for libbfd

James Clark caught that the BUILD_NONDISTRO=1 build with libbfd was
broken due to an update to the read_build_id function adding a
blocking argument. Add support for this argument by first opening the
file blocking or non-blocking, then switching from bfd_openr to
bfd_fdopenr and passing the opened fd. bfd_fdopenr closes the fd on
error and when bfd_close are called.

Reported-by: James Clark <james.clark@linaro.org>
Closes: https://lore.kernel.org/lkml/20250903-james-perf-read-build-id-fix-v1-2-6a694d0a980f@linaro.org/
Fixes: 2c369d91d093 ("perf symbol: Add blocking argument to filename__read_build_id")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250904161731.1193729-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
6 weeks agoperf test: Checking BPF metadata collection fails on version string
Thomas Richter [Fri, 22 Aug 2025 12:25:39 +0000 (14:25 +0200)] 
perf test: Checking BPF metadata collection fails on version string

commit edf2cadf01e8f ("perf test: add test for BPF metadata collection")

fails consistently on the version string check. The perf version
string on some of the constant integration test machines contains
characters with special meaning in grep's extended regular expression
matching algorithm. The output of perf version is:

 # perf version
 perf version 6.17.0-20250814.rc1.git20.24ea63ea3877.63.fc42.s390x+git
 #

and the '+' character has special meaning in egrep command.
Also the use of egrep is deprecated.

Change the perf version string check to fixed character matching
and get rid of egrep's warning being deprecated. Use grep -F instead.

Output before:
 # perf test -F 102
 Checking BPF metadata collection
 egrep: warning: egrep is obsolescent; using grep -E
 Basic BPF metadata test [Failed invalid output]
 102: BPF metadata collection test             : FAILED!
 #

Output after:
 # perf test -F 102
 Checking BPF metadata collection
 Basic BPF metadata test [Success]
 102: BPF metadata collection test             : Ok
 #

Fixes: edf2cadf01e8f ("perf test: add test for BPF metadata collection")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Blake Jones <blakejones@google.com>
Link: https://lore.kernel.org/r/20250822122540.4104658-1-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
6 weeks agoMerge tag 'nvme-6.17-2025-09-04' of git://git.infradead.org/nvme into block-6.17
Jens Axboe [Thu, 4 Sep 2025 23:21:28 +0000 (17:21 -0600)] 
Merge tag 'nvme-6.17-2025-09-04' of git://git.infradead.org/nvme into block-6.17

Pull NVMe fix from Keith:

"nvme fixes for 6.17

 - Fix protection information ref tag for device side gen/strip
   (Christoph)"

* tag 'nvme-6.17-2025-09-04' of git://git.infradead.org/nvme:
  nvme: fix PI insert on write

6 weeks agoACPI: RISC-V: Fix FFH_CPPC_CSR error handling
Anup Patel [Mon, 18 Aug 2025 14:35:59 +0000 (20:05 +0530)] 
ACPI: RISC-V: Fix FFH_CPPC_CSR error handling

The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error
code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must
not use sbi_err_map_linux_errno() for FFH_CPPC_CSR.

Fixes: 30f3ffbee86b ("ACPI: RISC-V: Add CPPC driver")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250818143600.894385-2-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoriscv: Only allow LTO with CMODEL_MEDANY
Nathan Chancellor [Thu, 10 Jul 2025 20:25:26 +0000 (13:25 -0700)] 
riscv: Only allow LTO with CMODEL_MEDANY

When building with CONFIG_CMODEL_MEDLOW and CONFIG_LTO_CLANG, there is a
series of errors due to some files being unconditionally compiled with
'-mcmodel=medany', mismatching with the rest of the kernel built with
'-mcmodel=medlow':

  ld.lld: error: Function Import: link error: linking module flags 'Code Model': IDs have conflicting values: 'i32 3' from vmlinux.a(init.o at 899908), and 'i32 1' from vmlinux.a(net-traces.o at 1014628)

Only allow LTO to be performed when CONFIG_CMODEL_MEDANY is enabled to
ensure there will be no code model mismatch errors. An alternative
solution would be disabling LTO for the files with a different code
model than the main kernel like some specialized areas of the kernel do
but doing that for individual files is not as sustainable than
forbidding the combination altogether.

Cc: stable@vger.kernel.org
Fixes: 021d23428bdb ("RISC-V: build: Allow LTO to be selected")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506290255.KBVM83vZ-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
6 weeks agoMerge tag 'amd-drm-fixes-6.17-2025-09-03' of https://gitlab.freedesktop.org/agd5f...
Dave Airlie [Thu, 4 Sep 2025 08:12:11 +0000 (18:12 +1000)] 
Merge tag 'amd-drm-fixes-6.17-2025-09-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.17-2025-09-03:

amdgpu:
- UserQ fixes
- MES 11 fix
- eDP/LVDS fix
- Fix non-DC audio clean up
- Fix duplicate cursor issue
- Fix error path in PSP init

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250903221656.251254-1-alexander.deucher@amd.com
6 weeks agoMerge tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Linus Torvalds [Thu, 4 Sep 2025 16:59:15 +0000 (09:59 -0700)] 
Merge tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from netfilter, wireless and Bluetooth.

  We're reverting the removal of a Sundance driver, a user has appeared.
  This makes the PR rather large in terms of LoC.

  There's a conspicuous absence of real, user-reported 6.17 issues.
  Slightly worried that the summer distracted people from testing.

  Previous releases - regressions:

   - ax25: properly unshare skbs in ax25_kiss_rcv()

  Previous releases - always broken:

   - phylink: disable autoneg for interfaces that have no inband, fix
     regression on pcs-lynx (NXP LS1088)

   - vxlan: fix null-deref when using nexthop objects

   - batman-adv: fix OOB read/write in network-coding decode

   - icmp: icmp_ndo_send: fix reversing address translation for replies

   - tcp: fix socket ref leak in TCP-AO failure handling for IPv6

   - mctp:
       - mctp_fraq_queue should take ownership of passed skb
       - usb: initialise mac header in RX path, avoid WARN

   - wifi: mac80211: do not permit 40 MHz EHT operation on 5/6 GHz,
     respect device limitations

   - wifi: wilc1000: avoid buffer overflow in WID string configuration

   - wifi: mt76:
       - fix regressions from mt7996 MLO support rework
       - fix offchannel handling issues on mt7996
       - fix multiple wcid linked list corruption issues
       - mt7921: don't disconnect when AP requests switch to a channel
         which requires radar detection
       - mt7925u: use connac3 tx aggr check in tx complete

   - wifi: intel:
       - improve validation of ACPI DSM data
       - cfg: restore some 1000 series configs

   - wifi: ath:
       - ath11k: a fix for GTK rekeying
       - ath12k: a missed WiFi7 capability (multi-link EMLSR)

   - eth: intel:
       - ice: fix races in "low latency" firmware interface for Tx timestamps
       - idpf: set mac type when adding and removing MAC filters
       - i40e: remove racy read access to some debugfs files

  Misc:

   - Revert "eth: remove the DLink/Sundance (ST201) driver"

   - netfilter: conntrack: helper: Replace -EEXIST by -EBUSY, avoid
     confusing modprobe"

* tag 'net-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (99 commits)
  phy: mscc: Stop taking ts_lock for tx_queue and use its own lock
  selftest: net: Fix weird setsockopt() in bind_bhash.c.
  MAINTAINERS: add Sabrina to TLS maintainers
  gve: update MAINTAINERS
  ppp: fix memory leak in pad_compress_skb
  net: xilinx: axienet: Add error handling for RX metadata pointer retrieval
  net: atm: fix memory leak in atm_register_sysfs when device_register fail
  netfilter: nf_tables: Introduce NFTA_DEVICE_PREFIX
  selftests: netfilter: fix udpclash tool hang
  ax25: properly unshare skbs in ax25_kiss_rcv()
  mctp: return -ENOPROTOOPT for unknown getsockopt options
  net/smc: Remove validation of reserved bits in CLC Decline message
  ipv4: Fix NULL vs error pointer check in inet_blackhole_dev_init()
  net: thunder_bgx: decrement cleanup index before use
  net: thunder_bgx: add a missing of_node_put
  net: phylink: move PHY interrupt request to non-fail path
  net: lockless sock_i_ino()
  tools: ynl-gen: fix nested array counting
  wifi: wilc1000: avoid buffer overflow in WID string configuration
  wifi: cfg80211: sme: cap SSID length in __cfg80211_connect_result()
  ...

6 weeks agoMerge tag 'slab-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka...
Linus Torvalds [Thu, 4 Sep 2025 16:54:20 +0000 (09:54 -0700)] 
Merge tag 'slab-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab

Pull slab fixes from Vlastimil Babka:

 - Stable fix to make slub_debug code not access invalid pointers in the
   process of reporting issues (Li Qiong)

 - Stable fix to make object tracking pass gfp flags to stackdepot to
   avoid deadlock in contexts that can't even wake up kswapd due to e.g.
   timers debugging enabled (yangshiguang)

* tag 'slab-for-6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
  mm: slub: avoid wake up kswapd in set_track_prepare
  mm/slub: avoid accessing metadata when pointer is invalid in object_err()

6 weeks agocifs: prevent NULL pointer dereference in UTF16 conversion
Makar Semyonov [Thu, 4 Sep 2025 12:28:41 +0000 (15:28 +0300)] 
cifs: prevent NULL pointer dereference in UTF16 conversion

There can be a NULL pointer dereference bug here. NULL is passed to
__cifs_sfu_make_node without checks, which passes it unchecked to
cifs_strndup_to_utf16, which in turn passes it to
cifs_local_to_utf16_bytes where '*from' is dereferenced, causing a crash.

This patch adds a check for NULL 'src' in cifs_strndup_to_utf16 and
returns NULL early to prevent dereferencing NULL pointer.

Found by Linux Verification Center (linuxtesting.org) with SVACE

Signed-off-by: Makar Semyonov <m.semenov@tssltd.ru>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>