[PATCH] tty/serial/8250: Request driver probe from an async task

From: Paul Menzel
Date: Sun Apr 01 2018 - 02:57:53 EST


Currently, according to `initcall_debug` running `serial8250_init` takes
around 33 ms on a Lenovo X60 and TUXEDO Book BU1406.

As this is in the critical path, and most distributions do *not* build
*8250* as a module, that means `CONFIG_SERIAL_8250=y`, probe the device
asynchronously, so other tasks are not hold up.

Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
---
drivers/tty/serial/8250/8250_core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 9342fc2ee7df..996de9c78001 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -894,6 +894,7 @@ static struct platform_driver serial8250_isa_driver = {
.driver = {
.name = "serial8250",
},
+ .driver.probe_type = PROBE_PREFER_ASYNCHRONOUS,
};

/*
--
2.14.1


--------------C55A42C5E8E528F2DC9C503D--