From: Danilo Krummrich <dakr@kernel.org>
To: gregkh@linuxfoundation.org, rafael@kernel.org,
hanguidong02@gmail.com, ysato@users.sourceforge.jp,
dalias@libc.org, glaubitz@physik.fu-berlin.de,
abelvesa@kernel.org, srini@kernel.org, s.nawrocki@samsung.com,
nuno.sa@analog.com
Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-hwmon@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
linux-sh@vger.kernel.org, Danilo Krummrich <dakr@kernel.org>
Subject: [PATCH 0/3] driver core: generalize driver_override infrastructure
Date: Mon, 2 Mar 2026 01:25:55 +0100 [thread overview]
Message-ID: <20260302002729.19438-1-dakr@kernel.org> (raw)
Currently, there are 12 busses (including platform and PCI) that duplicate the
driver_override logic for their individual devices.
All of them seem to be prone to the bug described in [1].
While this could be solved for every bus individually using a separate lock,
solving this in the driver-core generically results in less (and cleaner)
changes overall.
Thus, move driver_override to struct device, provide corresponding accessors for
busses and handle locking with a separate lock internally.
In particular, add device_set_driver_override(), device_has_driver_override(),
device_match_driver_override() and a helper, DEVICE_ATTR_DRIVER_OVERRIDE(), to
declare the corresponding sysfs store() and show() callbacks.
Until all busses have migrated, keep driver_set_override() in place.
Note that we can't use the device lock for the reasons described in [2].
This patch series includes the migration of the platform bus; patches for all
other affected busses still need to be extracted as a follow-up of the WIP
treewide patch in [3].
[1] https://bugzilla.kernel.org/show_bug.cgi?id=220789
[2] https://lore.kernel.org/driver-core/DGRGTIRHA62X.3RY09D9SOK77P@kernel.org/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=driver_override
Danilo Krummrich (3):
driver core: generalize driver_override in struct device
hwmon: axi-fan: don't use driver_override as IRQ name
driver core: platform: use generic driver_override infrastructure
arch/sh/drivers/platform_early.c | 6 ++-
drivers/base/core.c | 2 +
drivers/base/dd.c | 60 +++++++++++++++++++++++
drivers/base/platform.c | 35 ++------------
drivers/bus/simple-pm-bus.c | 4 +-
drivers/clk/imx/clk-scu.c | 3 +-
drivers/hwmon/axi-fan-control.c | 2 +-
drivers/slimbus/qcom-ngd-ctrl.c | 6 +--
include/linux/device.h | 81 ++++++++++++++++++++++++++++++++
include/linux/platform_device.h | 5 --
sound/soc/samsung/i2s.c | 6 +--
11 files changed, 161 insertions(+), 49 deletions(-)
base-commit: 78437ab3b769f80526416570f60173c89858dd84
--
2.53.0
next reply other threads:[~2026-03-02 0:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 0:25 Danilo Krummrich [this message]
2026-03-02 0:25 ` [PATCH 1/3] driver core: generalize driver_override in struct device Danilo Krummrich
2026-03-02 7:35 ` Gui-Dong Han
2026-03-02 8:36 ` Gui-Dong Han
2026-03-02 10:05 ` Danilo Krummrich
2026-03-02 11:04 ` Gui-Dong Han
2026-03-02 10:00 ` Geert Uytterhoeven
2026-03-02 10:26 ` Danilo Krummrich
2026-03-02 10:38 ` Geert Uytterhoeven
2026-03-02 11:03 ` Danilo Krummrich
2026-03-02 10:23 ` Armin Wolf
2026-03-02 16:28 ` Danilo Krummrich
2026-03-02 0:25 ` [PATCH 2/3] hwmon: axi-fan: don't use driver_override as IRQ name Danilo Krummrich
2026-03-02 0:51 ` Guenter Roeck
2026-03-02 10:00 ` Danilo Krummrich
2026-03-02 11:02 ` Nuno Sá
2026-03-02 0:25 ` [PATCH 3/3] driver core: platform: use generic driver_override infrastructure Danilo Krummrich
2026-03-02 8:55 ` Gui-Dong Han
2026-03-02 9:41 ` [PATCH 0/3] driver core: generalize " Gui-Dong Han
2026-03-02 10:12 ` Danilo Krummrich
2026-03-02 10:59 ` Gui-Dong Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260302002729.19438-1-dakr@kernel.org \
--to=dakr@kernel.org \
--cc=abelvesa@kernel.org \
--cc=dalias@libc.org \
--cc=driver-core@lists.linux.dev \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gregkh@linuxfoundation.org \
--cc=hanguidong02@gmail.com \
--cc=imx@lists.linux.dev \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=rafael@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=srini@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.