path: root/init/do_mounts.c
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2006-07-18 10:59:59 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-25 21:08:40 -0700
commitd779249ed4cb3b50690de6de8448829d65a1cd08 (patch)
tree0494df3b68a28ce0b23a1577758b583409621a7d /init/do_mounts.c
parentf20a9ead0d005fbeeae3fc21a96f9bf197ac1c1c (diff)
Driver Core: add ability for drivers to do a threaded probe
This adds the infrastructure for drivers to do a threaded probe, and waits at init time for all currently outstanding probes to complete. A new kernel thread will be created when the probe() function for the driver is called, if the multithread_probe bit is set in the driver saying it can support this kind of operation. I have tested this with USB and PCI, and it works, and shaves off a lot of time in the boot process, but there are issues with finding root boot disks, and some USB drivers assume that this can never happen, so it is currently not enabled for any bus type. Individual drivers can enable this right now if they wish, and bus authors can selectivly turn it on as well, once they determine that their subsystem will work properly with it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'init/do_mounts.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 94aeec7aa91..b290aadb1d3 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -8,6 +8,7 @@
#include <linux/security.h>
#include <linux/delay.h>
#include <linux/mount.h>
+#include <linux/device.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_fs_sb.h>
@@ -403,6 +404,10 @@ void __init prepare_namespace(void)
+ /* wait for the known devices to complete their probing */
+ while (driver_probe_done() != 0)
+ msleep(100);
if (saved_root_name[0]) {