Commit 5adc55da4a7758021bcc374904b0f8b076508a11

Authored by Adrian Bunk
Committed by Greg Kroah-Hartman
1 parent 032de8e2fe

PCI: remove the broken PCI_MULTITHREAD_PROBE option

This patch removes the PCI_MULTITHREAD_PROBE option that had already
been marked as broken.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 5 changed files with 3 additions and 83 deletions Side-by-side Diff

Documentation/pci.txt
... ... @@ -124,10 +124,6 @@
124 124  
125 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 128 The ID table is an array of struct pci_device_id entries ending with an
133 129 all-zero entry. Each entry consists of:
... ... @@ -226,12 +226,10 @@
226 226 *
227 227 * Walk the list of drivers that the bus has and call
228 228 * driver_probe_device() for each pair. If a compatible
229   - * pair is found, break out and return. If the bus specifies
230   - * multithreaded probing, walking the list of drivers is done
231   - * on a probing thread.
  229 + * pair is found, break out and return.
232 230 *
233 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 233 * -ENODEV if the device is not registered.
236 234 *
237 235 * When called for a USB interface, @dev->parent->sem must be held.
... ... @@ -239,7 +237,6 @@
239 237 int device_attach(struct device * dev)
240 238 {
241 239 int ret = 0;
242   - struct task_struct *probe_task = ERR_PTR(-ENOMEM);
243 240  
244 241 down(&dev->sem);
245 242 if (dev->driver) {
... ... @@ -251,12 +248,7 @@
251 248 ret = 0;
252 249 }
253 250 } else {
254   - if (dev->bus->multithread_probe)
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);
  251 + ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach);
260 252 }
261 253 up(&dev->sem);
262 254 return ret;
... ... @@ -382,33 +374,6 @@
382 374 put_device(dev);
383 375 }
384 376 }
385   -
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 377  
413 378 EXPORT_SYMBOL_GPL(device_bind_driver);
414 379 EXPORT_SYMBOL_GPL(device_release_driver);
... ... @@ -21,31 +21,6 @@
21 21  
22 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 24 config PCI_DEBUG
50 25 bool "PCI Debugging"
51 26 depends on PCI && DEBUG_KERNEL
drivers/pci/pci-driver.c
... ... @@ -14,20 +14,6 @@
14 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 17 * Dynamic device IDs are disabled for !CONFIG_HOTPLUG
32 18 */
33 19  
... ... @@ -569,7 +555,6 @@
569 555  
570 556 static int __init pci_driver_init(void)
571 557 {
572   - pci_bus_type.multithread_probe = pci_multithread_probe;
573 558 return bus_register(&pci_bus_type);
574 559 }
575 560  
include/linux/device.h
... ... @@ -80,7 +80,6 @@
80 80 int (*resume)(struct device * dev);
81 81  
82 82 unsigned int drivers_autoprobe:1;
83   - unsigned int multithread_probe:1;
84 83 };
85 84  
86 85 extern int __must_check bus_register(struct bus_type * bus);