diff options
-rw-r--r-- | Documentation/pci.txt | 4 | ||||
-rw-r--r-- | drivers/base/dd.c | 41 | ||||
-rw-r--r-- | drivers/pci/Kconfig | 25 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 15 | ||||
-rw-r--r-- | include/linux/device.h | 1 |
5 files changed, 3 insertions, 83 deletions
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index a8ded1a8bd62..40c4717d236b 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -124,10 +124,6 @@ initialization with a pointer to a structure describing the driver | |||
124 | 124 | ||
125 | err_handler See Documentation/pci-error-recovery.txt | 125 | err_handler See Documentation/pci-error-recovery.txt |
126 | 126 | ||
127 | multithread_probe Enable multi-threaded probe/scan. Driver must | ||
128 | provide its own locking/syncronization for init | ||
129 | operations if this is enabled. | ||
130 | |||
131 | 127 | ||
132 | The ID table is an array of struct pci_device_id entries ending with an | 128 | The ID table is an array of struct pci_device_id entries ending with an |
133 | all-zero entry. Each entry consists of: | 129 | all-zero entry. Each entry consists of: |
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 18dba8e78da7..92428e55b0c2 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -226,12 +226,10 @@ static int device_probe_drivers(void *data) | |||
226 | * | 226 | * |
227 | * Walk the list of drivers that the bus has and call | 227 | * Walk the list of drivers that the bus has and call |
228 | * driver_probe_device() for each pair. If a compatible | 228 | * driver_probe_device() for each pair. If a compatible |
229 | * pair is found, break out and return. If the bus specifies | 229 | * pair is found, break out and return. |
230 | * multithreaded probing, walking the list of drivers is done | ||
231 | * on a probing thread. | ||
232 | * | 230 | * |
233 | * Returns 1 if the device was bound to a driver; | 231 | * Returns 1 if the device was bound to a driver; |
234 | * 0 if no matching device was found or multithreaded probing is done; | 232 | * 0 if no matching device was found; |
235 | * -ENODEV if the device is not registered. | 233 | * -ENODEV if the device is not registered. |
236 | * | 234 | * |
237 | * When called for a USB interface, @dev->parent->sem must be held. | 235 | * When called for a USB interface, @dev->parent->sem must be held. |
@@ -239,7 +237,6 @@ static int device_probe_drivers(void *data) | |||
239 | int device_attach(struct device * dev) | 237 | int device_attach(struct device * dev) |
240 | { | 238 | { |
241 | int ret = 0; | 239 | int ret = 0; |
242 | struct task_struct *probe_task = ERR_PTR(-ENOMEM); | ||
243 | 240 | ||
244 | down(&dev->sem); | 241 | down(&dev->sem); |
245 | if (dev->driver) { | 242 | if (dev->driver) { |
@@ -251,12 +248,7 @@ int device_attach(struct device * dev) | |||
251 | ret = 0; | 248 | ret = 0; |
252 | } | 249 | } |
253 | } else { | 250 | } else { |
254 | if (dev->bus->multithread_probe) | 251 | ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach); |
255 | probe_task = kthread_run(device_probe_drivers, dev, | ||
256 | "probe-%s", dev->bus_id); | ||
257 | if(IS_ERR(probe_task)) | ||
258 | ret = bus_for_each_drv(dev->bus, NULL, dev, | ||
259 | __device_attach); | ||
260 | } | 252 | } |
261 | up(&dev->sem); | 253 | up(&dev->sem); |
262 | return ret; | 254 | return ret; |
@@ -383,33 +375,6 @@ void driver_detach(struct device_driver * drv) | |||
383 | } | 375 | } |
384 | } | 376 | } |
385 | 377 | ||
386 | #ifdef CONFIG_PCI_MULTITHREAD_PROBE | ||
387 | static int __init wait_for_probes(void) | ||
388 | { | ||
389 | DEFINE_WAIT(wait); | ||
390 | |||
391 | printk(KERN_INFO "%s: waiting for %d threads\n", __FUNCTION__, | ||
392 | atomic_read(&probe_count)); | ||
393 | if (!atomic_read(&probe_count)) | ||
394 | return 0; | ||
395 | while (atomic_read(&probe_count)) { | ||
396 | prepare_to_wait(&probe_waitqueue, &wait, TASK_UNINTERRUPTIBLE); | ||
397 | if (atomic_read(&probe_count)) | ||
398 | schedule(); | ||
399 | } | ||
400 | finish_wait(&probe_waitqueue, &wait); | ||
401 | return 0; | ||
402 | } | ||
403 | |||
404 | core_initcall_sync(wait_for_probes); | ||
405 | postcore_initcall_sync(wait_for_probes); | ||
406 | arch_initcall_sync(wait_for_probes); | ||
407 | subsys_initcall_sync(wait_for_probes); | ||
408 | fs_initcall_sync(wait_for_probes); | ||
409 | device_initcall_sync(wait_for_probes); | ||
410 | late_initcall_sync(wait_for_probes); | ||
411 | #endif | ||
412 | |||
413 | EXPORT_SYMBOL_GPL(device_bind_driver); | 378 | EXPORT_SYMBOL_GPL(device_bind_driver); |
414 | EXPORT_SYMBOL_GPL(device_release_driver); | 379 | EXPORT_SYMBOL_GPL(device_release_driver); |
415 | EXPORT_SYMBOL_GPL(device_attach); | 380 | EXPORT_SYMBOL_GPL(device_attach); |
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 70efe8f285a6..7a1d6d512837 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig | |||
@@ -21,31 +21,6 @@ config PCI_MSI | |||
21 | 21 | ||
22 | If you don't know what to do here, say N. | 22 | If you don't know what to do here, say N. |
23 | 23 | ||
24 | config PCI_MULTITHREAD_PROBE | ||
25 | bool "PCI Multi-threaded probe (EXPERIMENTAL)" | ||
26 | depends on PCI && EXPERIMENTAL && BROKEN | ||
27 | help | ||
28 | Say Y here if you want the PCI core to spawn a new thread for | ||
29 | every PCI device that is probed. This can cause a huge | ||
30 | speedup in boot times on multiprocessor machines, and even a | ||
31 | smaller speedup on single processor machines. | ||
32 | |||
33 | But it can also cause lots of bad things to happen. A number | ||
34 | of PCI drivers cannot properly handle running in this way, | ||
35 | some will just not work properly at all, while others might | ||
36 | decide to blow up power supplies with a huge load all at once, | ||
37 | so use this option at your own risk. | ||
38 | |||
39 | It is very unwise to use this option if you are not using a | ||
40 | boot process that can handle devices being created in any | ||
41 | order. A program that can create persistent block and network | ||
42 | device names (like udev) is a good idea if you wish to use | ||
43 | this option. | ||
44 | |||
45 | Again, use this option at your own risk, you have been warned! | ||
46 | |||
47 | When in doubt, say N. | ||
48 | |||
49 | config PCI_DEBUG | 24 | config PCI_DEBUG |
50 | bool "PCI Debugging" | 25 | bool "PCI Debugging" |
51 | depends on PCI && DEBUG_KERNEL | 26 | depends on PCI && DEBUG_KERNEL |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 07fdb3cd6172..3bb7739d26a5 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -14,20 +14,6 @@ | |||
14 | #include "pci.h" | 14 | #include "pci.h" |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Registration of PCI drivers and handling of hot-pluggable devices. | ||
18 | */ | ||
19 | |||
20 | /* multithreaded probe logic */ | ||
21 | static int pci_multithread_probe = | ||
22 | #ifdef CONFIG_PCI_MULTITHREAD_PROBE | ||
23 | 1; | ||
24 | #else | ||
25 | 0; | ||
26 | #endif | ||
27 | __module_param_call("", pci_multithread_probe, param_set_bool, param_get_bool, &pci_multithread_probe, 0644); | ||
28 | |||
29 | |||
30 | /* | ||
31 | * Dynamic device IDs are disabled for !CONFIG_HOTPLUG | 17 | * Dynamic device IDs are disabled for !CONFIG_HOTPLUG |
32 | */ | 18 | */ |
33 | 19 | ||
@@ -569,7 +555,6 @@ struct bus_type pci_bus_type = { | |||
569 | 555 | ||
570 | static int __init pci_driver_init(void) | 556 | static int __init pci_driver_init(void) |
571 | { | 557 | { |
572 | pci_bus_type.multithread_probe = pci_multithread_probe; | ||
573 | return bus_register(&pci_bus_type); | 558 | return bus_register(&pci_bus_type); |
574 | } | 559 | } |
575 | 560 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index a0cd2ced31a9..ff83b61d283d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -80,7 +80,6 @@ struct bus_type { | |||
80 | int (*resume)(struct device * dev); | 80 | int (*resume)(struct device * dev); |
81 | 81 | ||
82 | unsigned int drivers_autoprobe:1; | 82 | unsigned int drivers_autoprobe:1; |
83 | unsigned int multithread_probe:1; | ||
84 | }; | 83 | }; |
85 | 84 | ||
86 | extern int __must_check bus_register(struct bus_type * bus); | 85 | extern int __must_check bus_register(struct bus_type * bus); |