]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: isapnp_init: make isa PNP scans occur async
authorAndy Whitcroft <apw@canonical.com>
Wed, 2 Dec 2009 14:41:53 +0000 (14:41 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:33:03 +0000 (07:33 -0500)
The results of scanning for devices is to trigger udev events therefore
we can push this processing async.

This reduces kernel initialisation time (the time from bootloader to
starting userspace) by several 10ths of a second x86 32bit systems.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/pnp/isapnp/core.c

index d8bf5a13aa0708342781e56929496bae22cd7bd7..27f0bdb07f99c6db4b56ead90b55f28bb43949cb 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/init.h>
 #include <linux/isapnp.h>
 #include <linux/mutex.h>
+#include <linux/async.h>
 #include <asm/io.h>
 
 #include "../base.h"
@@ -987,7 +988,7 @@ struct pnp_protocol isapnp_protocol = {
        .disable = isapnp_disable_resources,
 };
 
-static int __init isapnp_init(void)
+static int __init real_isapnp_init(void)
 {
        int cards;
        struct pnp_card *card;
@@ -1081,6 +1082,16 @@ static int __init isapnp_init(void)
        return 0;
 }
 
+static void __init async_isapnp_init(void *unused, async_cookie_t cookie)
+{
+       (void)real_isapnp_init();
+}
+
+static int __init isapnp_init(void)
+{
+       async_schedule(async_isapnp_init, NULL);
+       return 0;
+}
 device_initcall(isapnp_init);
 
 /* format is: noisapnp */