The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS
@ 2026-07-27  5:31 Dmitry Torokhov
  2026-07-27  5:40 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2026-07-27  5:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Danilo Krummrich
  Cc: Rafael J. Wysocki, driver-core, linux-kernel

Add PROBE_FORCE_ASYNCHRONOUS probe type enum and update
driver_allows_async_probing() to allow asynchronous probing for drivers
marked with this type.

While PROBE_PREFER_ASYNCHRONOUS exists, it represents a temporary opt-in
preference. Subsystems that require asynchronous probing (such as slow
legacy buses) need a dedicated probe type to guarantee asynchronous
execution.

Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

I am planning to rework serio and gameport subsystems to rely on
asynchronous probing instead of rolling their own implementations.

 drivers/base/dd.c             | 1 +
 include/linux/device/driver.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 60c005223844..34df7b4416ac 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -936,6 +936,7 @@ __setup("driver_async_probe=", save_async_options);
 static bool driver_allows_async_probing(const struct device_driver *drv)
 {
 	switch (drv->probe_type) {
+	case PROBE_FORCE_ASYNCHRONOUS:
 	case PROBE_PREFER_ASYNCHRONOUS:
 		return true;
 
diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 768a1334c0a1..4b3901a35e85 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -48,6 +48,7 @@ enum probe_type {
 	PROBE_DEFAULT_STRATEGY,
 	PROBE_PREFER_ASYNCHRONOUS,
 	PROBE_FORCE_SYNCHRONOUS,
+	PROBE_FORCE_ASYNCHRONOUS,
 };
 
 /**
-- 
2.55.0.229.g6434b31f56-goog


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS
  2026-07-27  5:31 [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS Dmitry Torokhov
@ 2026-07-27  5:40 ` Greg Kroah-Hartman
  2026-07-27  5:54   ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-27  5:40 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Danilo Krummrich, Rafael J. Wysocki, driver-core, linux-kernel

On Sun, Jul 26, 2026 at 10:31:41PM -0700, Dmitry Torokhov wrote:
> Add PROBE_FORCE_ASYNCHRONOUS probe type enum and update
> driver_allows_async_probing() to allow asynchronous probing for drivers
> marked with this type.
> 
> While PROBE_PREFER_ASYNCHRONOUS exists, it represents a temporary opt-in
> preference. Subsystems that require asynchronous probing (such as slow
> legacy buses) need a dedicated probe type to guarantee asynchronous
> execution.
> 
> Assisted-by: Antigravity:gemini-3.5-flash
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
> I am planning to rework serio and gameport subsystems to rely on
> asynchronous probing instead of rolling their own implementations.

What do you mean?  Why doesn't the PROBE_PREFER_ASYNCHRONOUS work for
you for those subsystems?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS
  2026-07-27  5:40 ` Greg Kroah-Hartman
@ 2026-07-27  5:54   ` Dmitry Torokhov
  2026-07-27  6:25     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2026-07-27  5:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Danilo Krummrich, Rafael J. Wysocki, driver-core, linux-kernel

On Mon, Jul 27, 2026 at 07:40:57AM +0200, Greg Kroah-Hartman wrote:
> On Sun, Jul 26, 2026 at 10:31:41PM -0700, Dmitry Torokhov wrote:
> > Add PROBE_FORCE_ASYNCHRONOUS probe type enum and update
> > driver_allows_async_probing() to allow asynchronous probing for drivers
> > marked with this type.
> > 
> > While PROBE_PREFER_ASYNCHRONOUS exists, it represents a temporary opt-in
> > preference. Subsystems that require asynchronous probing (such as slow
> > legacy buses) need a dedicated probe type to guarantee asynchronous
> > execution.
> > 
> > Assisted-by: Antigravity:gemini-3.5-flash
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
> > 
> > I am planning to rework serio and gameport subsystems to rely on
> > asynchronous probing instead of rolling their own implementations.
> 
> What do you mean?  Why doesn't the PROBE_PREFER_ASYNCHRONOUS work for
> you for those subsystems?

It shows the intent. It is not "preference" anymore, it is a "must". If
we ever introduce switch to make probing synchronous for some reason it
should not affect drivers that must be probed asynchronously.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS
  2026-07-27  5:54   ` Dmitry Torokhov
@ 2026-07-27  6:25     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-27  6:25 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Danilo Krummrich, Rafael J. Wysocki, driver-core, linux-kernel

On Sun, Jul 26, 2026 at 10:54:54PM -0700, Dmitry Torokhov wrote:
> On Mon, Jul 27, 2026 at 07:40:57AM +0200, Greg Kroah-Hartman wrote:
> > On Sun, Jul 26, 2026 at 10:31:41PM -0700, Dmitry Torokhov wrote:
> > > Add PROBE_FORCE_ASYNCHRONOUS probe type enum and update
> > > driver_allows_async_probing() to allow asynchronous probing for drivers
> > > marked with this type.
> > > 
> > > While PROBE_PREFER_ASYNCHRONOUS exists, it represents a temporary opt-in
> > > preference. Subsystems that require asynchronous probing (such as slow
> > > legacy buses) need a dedicated probe type to guarantee asynchronous
> > > execution.
> > > 
> > > Assisted-by: Antigravity:gemini-3.5-flash
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > ---
> > > 
> > > I am planning to rework serio and gameport subsystems to rely on
> > > asynchronous probing instead of rolling their own implementations.
> > 
> > What do you mean?  Why doesn't the PROBE_PREFER_ASYNCHRONOUS work for
> > you for those subsystems?
> 
> It shows the intent. It is not "preference" anymore, it is a "must". If
> we ever introduce switch to make probing synchronous for some reason it
> should not affect drivers that must be probed asynchronously.

I'm sorry, but I don't understand.  And as there's no users for this, we
really can't take it until we see those users at the same time :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-27  6:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27  5:31 [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS Dmitry Torokhov
2026-07-27  5:40 ` Greg Kroah-Hartman
2026-07-27  5:54   ` Dmitry Torokhov
2026-07-27  6:25     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox