aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-08-16 12:42:18 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 20:43:53 -0400
commit50b0075520a0acba9cabab5203bbce918b966d9a (patch)
treeafb8dfb1ebb24b96754efea260a071ca79241ccd /drivers/pci/pci-driver.c
parentb19441af185559118e8247382ea4f2f76ebffc6d (diff)
PCI: Multiprobe sanitizer
There are numerous drivers that can use multithreaded probing but having some kind of global flag as the way to control this makes migration to threaded probing hard and since it enables it everywhere and is almost as likely to cause serious pain as holding a clog dance in a minefield. If we have a pci_driver multithread_probe flag to inherit you can turn it on for one driver at a time. From playing so far however I think we need a different model at the device layer which serializes until the called probe function says "ok you can start another one now". That would need some kind of flag and semaphore plus a helper function. Anyway in the absence of that this is a starting point to usefully play with this stuff Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r--drivers/pci/pci-driver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 309629e03bae..b1c0c707d96c 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -421,7 +421,11 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner)
421 drv->driver.bus = &pci_bus_type; 421 drv->driver.bus = &pci_bus_type;
422 drv->driver.owner = owner; 422 drv->driver.owner = owner;
423 drv->driver.kobj.ktype = &pci_driver_kobj_type; 423 drv->driver.kobj.ktype = &pci_driver_kobj_type;
424 drv->driver.multithread_probe = pci_multithread_probe; 424
425 if (pci_multithread_probe)
426 drv->driver.multithread_probe = pci_multithread_probe;
427 else
428 drv->driver.multithread_probe = drv->multithread_probe;
425 429
426 spin_lock_init(&drv->dynids.lock); 430 spin_lock_init(&drv->dynids.lock);
427 INIT_LIST_HEAD(&drv->dynids.list); 431 INIT_LIST_HEAD(&drv->dynids.list);