PCI: remove the "shadow" device list
Subsystems (6)
Here are a series of 12 patches that I've added to my quilt tree for 2.6.26 that delete the "shadow" PCI device tree. There is no real need to keep two lists of all PCI devices in the kernel, the driver core should be able to properly handle all of this.
We do keep the bus list of devices, as that is still useful for a lot of things, and I don't see any obviously easy way to clean that up at the moment.
Overall, the patch ends up deleting a lot of code, which is always a good thing.
Comments are appreciated.
thanks,
greg k-h
----------------------
Documentation/kernel-parameters.txt | 4 - arch/frv/mb93090-mb00/pci-frv.h | 2 - arch/frv/mb93090-mb00/pci-vdk.c | 53 ----- arch/mn10300/unit-asb2305/pci-asb2305.h | 2 - arch/powerpc/platforms/pseries/pci_dlpar.c | 7 +- arch/sh/drivers/pci/pci-sh4.h | 2 - arch/x86/kernel/pci-calgary_64.c | 3 +- arch/x86/pci/common.c | 61 ------ arch/x86/pci/pcbios.c | 72 ------- arch/x86/pci/pci.h | 3 - drivers/ide/ide-scan-pci.c | 9 +- drivers/ide/ide.c | 12 - drivers/pci/bus.c | 15 +- drivers/pci/hotplug/Kconfig | 4 +- drivers/pci/hotplug/cpcihp_generic.c | 8 +- drivers/pci/probe.c | 56 ++---- drivers/pci/remove.c | 10 +- drivers/pci/search.c | 313 +++++++++++----------------- include/asm-sh/mpc1211/pci.h | 2 - include/linux/ide.h | 1 - include/linux/pci.h | 20 +-- 21 files changed, 159 insertions(+), 500 deletions(-)
---------------
Greg Kroah-Hartman (12):
PCI: remove pci_find_present
PCI: remove pci_get_device_reverse from calgary driver
IDE: remove ide=reverse IDE core
PCI: remove pci_get_device_reverse
PCI: clean up search.c a lot
PCI Hotplug: make cpcihp driver use modern apis PCI Hotplug: the ibm driver is not dependant on PCI_LEGACY
PCI: remove initial bios sort of PCI devices on x86
PCI: make no_pci_devices() use the pci_bus_type list
PCI: add is_added flag to struct pci_dev
PCI: remove pcibious_fixup_ghosts()
PCI: remove global list of PCI devices
PATCH 1/12 PCI: remove pci_find_present
No one is using this function anymore for quite some time, so remove it. Everyone calls pci_dev_present() instead anyway...
--- drivers/pci/search.c | 35 +++++++++++++++-------------------- include/linux/pci.h | 2 -- 2 files changed, 15 insertions(+), 22 deletions(-)
drivers/pci/search.c +15 -20
@@ -436,7 +436,18 @@ exit:return dev; } -const struct pci_device_id *pci_find_present (const struct pci_device_id *ids) +/** +* pci_dev_present - Returns 1 if device matching the device list is present, 0 if not. +* @ids: A pointer to a null terminated list of struct pci_device_id structures +* that describe the type of PCI device the caller is trying to find. +* +* Obvious fact: You do not have a reference to any device that might be found +* by this function, so if that device is removed from the system right after +* this function is finished, the value will be stale. Use this function to +* find devices that are usually built into a system, or for a general hint as +* to if another device happens to be present at this specific moment in time. +*/ +int pci_dev_present (const struct pci_device_id *ids) {struct pci_dev *dev;const struct pci_device_id *found =NULL ;
@@ -452,27 +463,11 @@ const struct pci_device_id *pci_find_present(const struct pci_device_id *ids) } exit:up_read (&pci_bus_sem); -return found; -} - -/** -* pci_dev_present - Returns 1 if device matching the device list is present, 0 if not. -* @ids: A pointer to a null terminated list of struct pci_device_id structures -* that describe the type of PCI device the caller is trying to find. -* -* Obvious fact: You do not have a reference to any device that might be found -* by this function, so if that device is removed from the system right after -* this function is finished, the value will be stale. Use this function to -* find devices that are usually built into a system, or for a general hint as -* to if another device happens to be present at this specific moment in time. -*/ -int pci_dev_present (const struct pci_device_id *ids) -{ -return pci_find_present (ids) ==NULL ?0 :1 ; +if (found) +return 1 ; +return 0 ; } -EXPORT_SYMBOL (pci_dev_present); -EXPORT_SYMBOL (pci_find_present);#ifdef CONFIG_PCI_LEGACY EXPORT_SYMBOL (pci_find_device);
include/linux/pci.h +0 -2
@@ -517,7 +517,6 @@ struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);struct pci_dev *pci_get_bus_and_slot (unsigned int bus,unsigned int devfn);struct pci_dev *pci_get_class (unsigned int class,struct pci_dev *from);int pci_dev_present (const struct pci_device_id *ids); -const struct pci_device_id *pci_find_present (const struct pci_device_id *ids);int pci_bus_read_config_byte (struct pci_bus *bus,unsigned int devfn,int where,u8 *val);
@@ -807,7 +806,6 @@ static inline struct pci_dev *pci_get_class(unsigned int class,#define pci_dev_present (ids) (0)#define no_pci_devices () (1) -#define pci_find_present (ids) (NULL)#define pci_dev_put (dev) do { } while (0)static inline void pci_set_master (struct pci_dev *dev)
Signature · 1 line
1.5.4
PATCH 2/12 PCI: remove pci_get_device_reverse from calgary driver
In reply to Greg KHThis isn't needed, we can just walk the devices in bus order with no problems at all, as we really want to remove pci_get_device_reverse from the kernel tree.
--- arch/x86/kernel/pci-calgary_64.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/x86/kernel/pci-calgary_64.c +1 -2
@@ -1232,8 +1232,7 @@ static int __init calgary_init(void) error: do { - dev = pci_get_device_reverse(PCI_VENDOR_ID_IBM, - PCI_ANY_ID, dev); + dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev); if (!dev) break; if (!is_cal_pci_dev(dev->device))
Signature · 1 line
1.5.4
PATCH 3/12 IDE: remove ide=reverse IDE core
In reply to Greg KHThis option is obsolete and can be removed safely.
It allows us to remove the pci_get_device_reverse() function from the PCI core.
--- drivers/ide/ide-scan-pci.c | 9 ++------- drivers/ide/ide.c | 12 ------------ include/linux/ide.h | 1 - 3 files changed, 2 insertions(+), 20 deletions(-)
drivers/ide/ide-scan-pci.c +2 -7
@@ -88,13 +88,8 @@ static int __init ide_scan_pcibus(void)struct list_head *l, *n; pre_init =0 ; -if (!ide_scan_direction) -while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev))) -ide_scan_pcidev (dev); -else -while ((dev =pci_get_device_reverse (PCI_ANY_ID ,PCI_ANY_ID , - dev))) -ide_scan_pcidev (dev); +while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev))) +ide_scan_pcidev (dev);/* * Hand the drivers over to the PCI layer now we
drivers/ide/ide.c +0 -12
@@ -90,10 +90,6 @@ static int system_bus_speed; /* holds what we think is VESA/PCI bus speed */DEFINE_MUTEX (ide_cfg_mtx);__cacheline_aligned_in_smp DEFINE_SPINLOCK (ide_lock ); -#ifdef CONFIG_IDEPCI_PCIBUS_ORDER -int ide_scan_direction;/* THIS was formerly 2.2.x pci=reverse */ -#endif -int noautodma =0 ;#ifdef CONFIG_BLK_DEV_IDEACPI
@@ -1225,14 +1221,6 @@ static int __init ide_setup(char *s) goto obsolete_option; } -#ifdef CONFIG_IDEPCI_PCIBUS_ORDER -if (!strcmp (s,"ide=reverse" )) { - ide_scan_direction =1 ; -printk (" : Enabled support for IDE inverse scan order.\n" ); -return 1 ; - } -#endif -#ifdef CONFIG_BLK_DEV_IDEACPI if (!strcmp (s,"ide=noacpi" )) {//printk(" : Disable IDE ACPI support.\n");
include/linux/ide.h +0 -1
@@ -990,7 +990,6 @@ extern void do_ide_request(struct request_queue *);void ide_init_disk (struct gendisk *,ide_drive_t *);#ifdef CONFIG_IDEPCI_PCIBUS_ORDER -extern int ide_scan_direction;extern int __ide_pci_register_driver (struct pci_driver *driver,struct module *owner,const char *mod_name);#define ide_pci_register_driver (d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME)#else
Signature · 1 line
1.5.4
PATCH 4/12 PCI: remove pci_get_device_reverse
In reply to Greg KHThis removes the pci_get_device_reverse function as there should not be any need to walk pci devices backwards anymore. All users of this call are now gone from the tree, so it is safe to remove it.
--- drivers/pci/search.c | 41 ----------------------------------------- include/linux/pci.h | 10 ---------- 2 files changed, 0 insertions(+), 51 deletions(-)
drivers/pci/search.c +0 -41
@@ -360,46 +360,6 @@ pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from) }/** -* pci_get_device_reverse - begin or continue searching for a PCI device by vendor/device id -* @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids -* @device: PCI device id to match, or %PCI_ANY_ID to match all device ids -* @from: Previous PCI device found in search, or %NULL for new search. -* -* Iterates through the list of known PCI devices in the reverse order of -* pci_get_device. -* If a PCI device is found with a matching @vendor and @device, the reference -* count to the device is incremented and a pointer to its device structure -* is returned Otherwise, %NULL is returned. A new search is initiated by -* passing %NULL as the @from argument. Otherwise if @from is not %NULL, -* searches continue from next device on the global list. The reference -* count for @from is always decremented if it is not %NULL. -*/ -struct pci_dev * -pci_get_device_reverse (unsigned int vendor,unsigned int device,struct pci_dev *from) -{ -struct list_head *n; -struct pci_dev *dev; - -WARN_ON (in_interrupt ()); -down_read (&pci_bus_sem); - n = from ? from->global_list.prev : pci_devices.prev; - -while (n && (n != &pci_devices)) { - dev =pci_dev_g (n); -if ((vendor ==PCI_ANY_ID || dev->vendor == vendor) && - (device ==PCI_ANY_ID || dev->device == device)) - goto exit; - n = n->prev; - } - dev =NULL ; -exit: - dev =pci_dev_get (dev); -up_read (&pci_bus_sem); -pci_dev_put (from); -return dev; -} - -/** * pci_get_class - begin or continue searching for a PCI device by class * @class: search for a PCI device with this class designation * @from: Previous PCI device found in search, or %NULL for new search.
@@ -479,7 +439,6 @@ EXPORT_SYMBOL(pci_find_bus);EXPORT_SYMBOL (pci_find_next_bus);/* For everyone */ EXPORT_SYMBOL (pci_get_device); -EXPORT_SYMBOL (pci_get_device_reverse);EXPORT_SYMBOL (pci_get_subsys);EXPORT_SYMBOL (pci_get_slot);EXPORT_SYMBOL (pci_get_bus_and_slot);
include/linux/pci.h +0 -10
@@ -507,9 +507,6 @@ struct pci_bus *pci_find_next_bus(const struct pci_bus *from);struct pci_dev *pci_get_device (unsigned int vendor,unsigned int device,struct pci_dev *from); -struct pci_dev *pci_get_device_reverse (unsigned int vendor,unsigned int device, -struct pci_dev *from); -struct pci_dev *pci_get_subsys (unsigned int vendor,unsigned int device,unsigned int ss_vendor,unsigned int ss_device,struct pci_dev *from);
@@ -782,13 +779,6 @@ static inline struct pci_dev *pci_get_device(unsigned int vendor,return NULL ; } -static inline struct pci_dev *pci_get_device_reverse (unsigned int vendor, -unsigned int device, -struct pci_dev *from) -{ -return NULL ; -} - static inline struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, unsigned int ss_vendor,
Signature · 1 line
1.5.4
PATCH 5/12 PCI: clean up search.c a lot
In reply to Greg KHThis cleans up the search.c file, now using the pci list of devices that are created for the driver core, instead of relying on our separate list of devices. It's better to use the functions already created for this kind of thing, instead of rolling our own all the time.
This work is done in anticipation of getting rid of that second list of pci devices all together.
And it ends up saving code, always a nice benefit.
This also removes one compiler warning for when CONFIG_PCI_LEGACY is enabled as we no longer internally use the deprecated functions anymore.
--- drivers/pci/search.c | 249 ++++++++++++++++++++++--------------------------- include/linux/pci.h | 4 +- 2 files changed, 114 insertions(+), 139 deletions(-)
drivers/pci/search.c +112 -137
@@ -114,31 +114,63 @@ pci_find_next_bus(const struct pci_bus *from) }#ifdef CONFIG_PCI_LEGACY -/** * pci_find_slot - locate PCI device from a given PCI slot * @bus: number of PCI bus on which desired PCI device resides -* @devfn: encodes number of PCI slot in which the desired PCI -* device resides and the logical device number within that slot +* @devfn: encodes number of PCI slot in which the desired PCI +* device resides and the logical device number within that slot * in case of multi-function devices. * -* Given a PCI bus and slot/function number, the desired PCI device +* Given a PCI bus and slot/function number, the desired PCI device * is located in system global list of PCI devices. If the device -* is found, a pointer to its data structure is returned. If no +* is found, a pointer to its data structure is returned. If no * device is found, %NULL is returned. +* +* NOTE: Do not use this function any more; use pci_get_slot() instead, as +* the PCI device returned by this function can disappear at any moment in +* time. */ -struct pci_dev * -pci_find_slot (unsigned int bus,unsigned int devfn) +struct pci_dev *pci_find_slot (unsigned int bus,unsigned int devfn) {struct pci_dev *dev =NULL ; -while ((dev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) { -if (dev->bus->number == bus && dev->devfn == devfn) +while ((dev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , dev)) !=NULL ) { +if (dev->bus->number == bus && dev->devfn == devfn) { +pci_dev_put (dev);return dev; + } }return NULL ; } +EXPORT_SYMBOL (pci_find_slot); +/** +* pci_find_device - begin or continue searching for a PCI device by vendor/device id +* @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids +* @device: PCI device id to match, or %PCI_ANY_ID to match all device ids +* @from: Previous PCI device found in search, or %NULL for new search. +* +* Iterates through the list of known PCI devices. If a PCI device is found +* with a matching @vendor and @device, a pointer to its device structure is +* returned. Otherwise, %NULL is returned. +* A new search is initiated by passing %NULL as the @from argument. +* Otherwise if @from is not %NULL, searches continue from next device +* on the global list. +* +* NOTE: Do not use this function any more; use pci_get_device() instead, as +* the PCI device returned by this function can disappear at any moment in +* time. +*/ +struct pci_dev *pci_find_device (unsigned int vendor,unsigned int device, +const struct pci_dev *from) +{ +struct pci_dev *pdev; + + pdev =pci_get_subsys (vendor, device,PCI_ANY_ID ,PCI_ANY_ID , from); +pci_dev_put (pdev); +return pdev; +} +EXPORT_SYMBOL (pci_find_device);#endif /* CONFIG_PCI_LEGACY */ /**
@@ -204,86 +236,52 @@ struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn)return NULL ; } -#ifdef CONFIG_PCI_LEGACY -/** -* pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id -* @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids -* @device: PCI device id to match, or %PCI_ANY_ID to match all device ids -* @ss_vendor: PCI subsystem vendor id to match, or %PCI_ANY_ID to match all vendor ids -* @ss_device: PCI subsystem device id to match, or %PCI_ANY_ID to match all device ids -* @from: Previous PCI device found in search, or %NULL for new search. -* -* Iterates through the list of known PCI devices. If a PCI device is -* found with a matching @vendor, @device, @ss_vendor and @ss_device, a -* pointer to its device structure is returned. Otherwise, %NULL is returned. -* A new search is initiated by passing %NULL as the @from argument. -* Otherwise if @from is not %NULL, searches continue from next device -* on the global list. -* -* NOTE: Do not use this function any more; use pci_get_subsys() instead, as -* the PCI device returned by this function can disappear at any moment in -* time. -*/ -static struct pci_dev *pci_find_subsys (unsigned int vendor, -unsigned int device, -unsigned int ss_vendor, -unsigned int ss_device, -const struct pci_dev *from) +static int match_pci_dev_by_id (struct device *dev,void *data) { -struct list_head *n; -struct pci_dev *dev; +struct pci_dev *pdev =to_pci_dev (dev); +struct pci_device_id *id = data; -WARN_ON (in_interrupt ()); - -/* -* pci_find_subsys() can be called on the ide_setup() path, super-early -* in boot. But the down_read() will enable local interrupts, which -* can cause some machines to crash. So here we detect and flag that -* situation and bail out early. -*/ -if (unlikely (no_pci_devices ())) -return NULL ; -down_read (&pci_bus_sem); - n = from ? from->global_list.next : pci_devices.next; - -while (n && (n != &pci_devices)) { - dev =pci_dev_g (n); -if ((vendor ==PCI_ANY_ID || dev->vendor == vendor) && - (device ==PCI_ANY_ID || dev->device == device) && - (ss_vendor ==PCI_ANY_ID || dev->subsystem_vendor == ss_vendor) && - (ss_device ==PCI_ANY_ID || dev->subsystem_device == ss_device)) - goto exit; - n = n->next; - } - dev =NULL ; -exit: -up_read (&pci_bus_sem); -return dev; +if (pci_match_one_device (id, pdev)) +return 1 ; +return 0 ; } -/** -* pci_find_device - begin or continue searching for a PCI device by vendor/device id -* @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids -* @device: PCI device id to match, or %PCI_ANY_ID to match all device ids +/* +* pci_get_dev_by_id - begin or continue searching for a PCI device by id +* @id: pointer to struct pci_device_id to match for the device * @from: Previous PCI device found in search, or %NULL for new search. * * Iterates through the list of known PCI devices. If a PCI device is found -* with a matching @vendor and @device, a pointer to its device structure is -* returned. Otherwise, %NULL is returned. -* A new search is initiated by passing %NULL as the @from argument. -* Otherwise if @from is not %NULL, searches continue from next device -* on the global list. -* -* NOTE: Do not use this function any more; use pci_get_device() instead, as -* the PCI device returned by this function can disappear at any moment in -* time. +* with a matching id a pointer to its device structure is returned, and the +* reference count to the device is incremented. Otherwise, %NULL is returned. +* A new search is initiated by passing %NULL as the @from argument. Otherwise +* if @from is not %NULL, searches continue from next device on the global +* list. The reference count for @from is always decremented if it is not +* %NULL. +* +* This is an internal function for use by the other search functions in +* this file. */ -struct pci_dev * -pci_find_device (unsigned int vendor,unsigned int device,const struct pci_dev *from) +static struct pci_dev *pci_get_dev_by_id (const struct pci_device_id *id, +const struct pci_dev *from) { -return pci_find_subsys (vendor, device,PCI_ANY_ID ,PCI_ANY_ID , from); +struct device *dev; +struct device *dev_start =NULL ; +struct pci_dev *pdev =NULL ; + +WARN_ON (in_interrupt ()); +if (from) { +/* FIXME +* take the cast off, when bus_find_device is made const. +*/ + dev_start = (struct device *)&from->dev; + } + dev =bus_find_device (&pci_bus_type, dev_start, (void *)id, + match_pci_dev_by_id); +if (dev) + pdev =to_pci_dev (dev); +return pdev; } -#endif /* CONFIG_PCI_LEGACY */ /** * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id
@@ -301,42 +299,34 @@ pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev ** searches continue from next device on the global list. * The reference count for @from is always decremented if it is not %NULL. */ -struct pci_dev * -pci_get_subsys (unsigned int vendor,unsigned int device, -unsigned int ss_vendor,unsigned int ss_device, -struct pci_dev *from) +struct pci_dev *pci_get_subsys (unsigned int vendor,unsigned int device, +unsigned int ss_vendor,unsigned int ss_device, +const struct pci_dev *from) { -struct list_head *n; -struct pci_dev *dev; - -WARN_ON (in_interrupt ()); +struct pci_dev *pdev; +struct pci_device_id *id;/* -* pci_get_subsys() can potentially be called by drivers super-early -* in boot. But the down_read() will enable local interrupts, which -* can cause some machines to crash. So here we detect and flag that -* situation and bail out early. +* pci_find_subsys() can be called on the ide_setup() path, +* super-early in boot. But the down_read() will enable local +* interrupts, which can cause some machines to crash. So here we +* detect and flag that situation and bail out early. */ if (unlikely (no_pci_devices ()))return NULL ; -down_read (&pci_bus_sem); - n = from ? from->global_list.next : pci_devices.next; - -while (n && (n != &pci_devices)) { - dev =pci_dev_g (n); -if ((vendor ==PCI_ANY_ID || dev->vendor == vendor) && - (device ==PCI_ANY_ID || dev->device == device) && - (ss_vendor ==PCI_ANY_ID || dev->subsystem_vendor == ss_vendor) && - (ss_device ==PCI_ANY_ID || dev->subsystem_device == ss_device)) - goto exit; - n = n->next; - } - dev =NULL ; -exit: - dev =pci_dev_get (dev); -up_read (&pci_bus_sem); -pci_dev_put (from); -return dev; + + id =kzalloc (sizeof (*id),GFP_KERNEL ); +if (!id) +return NULL ; + id->vendor = vendor; + id->device = device; + id->subvendor = ss_vendor; + id->subdevice = ss_device; + + pdev =pci_get_dev_by_id (id, from); +kfree (id); + +return pdev; }/**
@@ -375,24 +365,18 @@ pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from)*/ struct pci_dev *pci_get_class (unsigned int class,struct pci_dev *from) { -struct list_head *n;struct pci_dev *dev; +struct pci_device_id *id; -WARN_ON (in_interrupt ()); -down_read (&pci_bus_sem); - n = from ? from->global_list.next : pci_devices.next; + id =kzalloc (sizeof (*id),GFP_KERNEL ); +if (!id) +return NULL ; + id->vendor = id->device = id->subvendor = id->subdevice =PCI_ANY_ID ; + id->class_mask =PCI_ANY_ID ; + id->class = class; -while (n && (n != &pci_devices)) { - dev =pci_dev_g (n); -if (dev->class == class) - goto exit; - n = n->next; - } - dev =NULL ; -exit: - dev =pci_dev_get (dev); -up_read (&pci_bus_sem); -pci_dev_put (from); + dev =pci_get_dev_by_id (id, from); +kfree (id);return dev; }
@@ -409,31 +393,22 @@ exit:*/ int pci_dev_present (const struct pci_device_id *ids) { -struct pci_dev *dev; -const struct pci_device_id *found =NULL ; +struct pci_dev *found =NULL ;WARN_ON (in_interrupt ()); -down_read (&pci_bus_sem);while (ids->vendor || ids->subvendor || ids->class_mask) { -list_for_each_entry (dev, &pci_devices, global_list) { -if ((found =pci_match_one_device (ids, dev)) !=NULL ) - goto exit; - } + found =pci_get_dev_by_id (ids,NULL ); +if (found) + goto exit; ids++; } exit: -up_read (&pci_bus_sem);if (found)return 1 ;return 0 ; }EXPORT_SYMBOL (pci_dev_present); -#ifdef CONFIG_PCI_LEGACY -EXPORT_SYMBOL (pci_find_device); -EXPORT_SYMBOL (pci_find_slot); -#endif /* CONFIG_PCI_LEGACY */ -/* For boot time work */ EXPORT_SYMBOL (pci_find_bus);EXPORT_SYMBOL (pci_find_next_bus);
include/linux/pci.h +2 -2
@@ -509,7 +509,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from);struct pci_dev *pci_get_subsys (unsigned int vendor,unsigned int device,unsigned int ss_vendor,unsigned int ss_device, -struct pci_dev *from); +const struct pci_dev *from);struct pci_dev *pci_get_slot (struct pci_bus *bus,unsigned int devfn);struct pci_dev *pci_get_bus_and_slot (unsigned int bus,unsigned int devfn);struct pci_dev *pci_get_class (unsigned int class,struct pci_dev *from);
@@ -783,7 +783,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor,unsigned int device, unsigned int ss_vendor, unsigned int ss_device, - struct pci_dev *from) + const struct pci_dev *from) { return NULL; }
Signature · 1 line
1.5.4
PATCH 6/12 PCI Hotplug: make cpcihp driver use modern apis
In reply to Greg KHThis removes the depandancy of the cpcihp driver from the PCI_LEGACY config option by removing its usage of the pci_find_bus() function.
--- drivers/pci/hotplug/Kconfig | 2 +- drivers/pci/hotplug/cpcihp_generic.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-)
drivers/pci/hotplug/Kconfig +1 -1
@@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550 config HOTPLUG_PCI_CPCI_GENERIC tristate "Generic port I/O CompactPCI Hotplug driver" - depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY + depends on HOTPLUG_PCI_CPCI && X86 help Say Y here if you have a CompactPCI system card that exposes the #ENUM hotswap signal as a bit in a system register that can be read through
drivers/pci/hotplug/cpcihp_generic.c +7 -1
@@ -154,12 +154,18 @@ static int __init cpcihp_generic_init(void)if (!r)return -EBUSY ; - dev =pci_find_slot (bridge_busnr,PCI_DEVFN (bridge_slot,0 )); + bus =pci_find_bus (0 , bridge_busnr); +if (!bus) { +err ("Invalid bus number %d" , bridge_busnr); +return -EINVAL ; + } + dev =pci_get_slot (bus,PCI_DEVFN (bridge_slot,0 ));if (!dev || dev->hdr_type !=PCI_HEADER_TYPE_BRIDGE ) {err ("Invalid bridge device %s" , bridge);return -EINVAL ; } bus = dev->subordinate; +pci_dev_put (dev);memset (&generic_hpc,0 ,sizeof (struct cpci_hp_controller )); generic_hpc_ops.query_enum = query_enum;
Signature · 1 line
1.5.4
Re: [PATCH 06/12] PCI Hotplug: make cpcihp driver use modern apis
Quoted 7 lines · Greg Kroah-Hartman
This removes the depandancy of the cpcihp driver from the
PCI_LEGACYconfig option by removing its usage of thepci_find_bus()function.Cc Kristen Carlson Accardi <[email protected]>Cc Scott Murray <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Sorry for the slow reply, this looks fine to me.
Scott
Quoted 43 lines
--- drivers/pci/hotplug/Kconfig | 2 +- drivers/pci/hotplug/cpcihp_generic.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-)drivers/pci/hotplug/Kconfig +1
-1@@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550 config HOTPLUG_PCI_CPCI_GENERIC tristate "Generic port I/O CompactPCI Hotplug driver" - depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY + depends on HOTPLUG_PCI_CPCI && X86 help Say Y here if you have a CompactPCI system card that exposes the #ENUM hotswap signal as a bit in a system register that can be read throughdrivers/pci/hotplug/cpcihp_generic.c +7
-1@@ -154,12 +154,18 @@ static int __init cpcihp_generic_init(void)if (!r)return -EBUSY ; - dev =pci_find_slot (bridge_busnr,PCI_DEVFN (bridge_slot,0 )); + bus =pci_find_bus (0 , bridge_busnr); +if (!bus) { +err ("Invalid bus number %d" , bridge_busnr); +return -EINVAL ; + } + dev =pci_get_slot (bus,PCI_DEVFN (bridge_slot,0 ));if (!dev || dev->hdr_type !=PCI_HEADER_TYPE_BRIDGE ) {err ("Invalid bridge device %s" , bridge);return -EINVAL ; } bus = dev->subordinate; +pci_dev_put (dev);memset (&generic_hpc,0 ,sizeof (struct cpci_hp_controller )); generic_hpc_ops.query_enum = query_enum;
Signature · 4 lines
Scott Murray SOMA Networks, Inc. Toronto, Ontario e-mail: [email protected]
Re: [Pcihpd-discuss] [PATCH 06/12] PCI Hotplug: make cpcihp driver use modern apis
Quoted 6 lines · Scott Murray
Quoted 4 lines · Greg Kroah-Hartman
This removes the depandancy of the cpcihp driver from the
PCI_LEGACYconfig option by removing its usage of thepci_find_bus()function.
Quoted 7 lines
Quoted 3 lines
Cc Kristen Carlson Accardi <[email protected]>Cc Scott Murray <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>Sorry for the slow reply, this looks fine to me.
Signed-off-by Scott Murray <[email protected]>
Great, thanks for reviewing it.
greg k-h
PATCH 7/12 PCI Hotplug: the ibm driver is not dependant on PCI_LEGACY
In reply to Greg KHThis was marked incorrectly for some reason. Allow the ibmphp driver to be built even if PCI_LEGACY is not enabled.
--- drivers/pci/hotplug/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pci/hotplug/Kconfig +1 -1
@@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM config HOTPLUG_PCI_IBM tristate "IBM PCI Hotplug driver" - depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY + depends on X86_IO_APIC && X86 && PCI_BIOS help Say Y here if you have a motherboard with a IBM PCI Hotplug controller.
Signature · 1 line
1.5.4
PATCH 8/12 PCI: remove initial bios sort of PCI devices on x86
In reply to Greg KHWe currently keep 2 lists of PCI devices in the system, one in the driver core, and one all on its own. This second list is sorted at boot time, in "BIOS" order, to try to remain compatible with older kernels (2.2 and earlier days). There was also a "nosort" option to turn this sorting off, to remain compatible with even older kernel versions, but that just ends up being what we have been doing from 2.5 days...
Unfortunately, the second list of devices is not really ever used to determine the probing order of PCI devices or drivers[1]. That is done using the driver core list instead. This change happened back in the early 2.5 days.
Relying on BIOS ording for the binding of drivers to specific device names is problematic for many reasons, and userspace tools like udev exist to properly name devices in a persistant manner if that is needed, no reliance on the BIOS is needed.
Matt Domsch and others at Dell noticed this back in 2006, and added a boot option to sort the PCI device lists (both of them) in a breadth-first manner to help remain compatible with the 2.4 order, if needed for any reason. This option is not going away, as some systems rely on them.
This patch removes the sorting of the internal PCI device list in "BIOS" mode, as it's not needed at all anymore, and hasn't for many years. I've also removed the PCI flags for this from some other arches that for some reason defined them, but never used them.
This should not change the ordering of any drivers or device probing.
[1] The old-style pci_get_device and pci_find_device() still used this sorting order, but there are very few drivers that use these functions, as they are deprecated for use in this manner. If for some reason, a driver rely on the order and uses these functions, the breadth-first boot option will resolve any problem.
--- Documentation/kernel-parameters.txt | 4 -- arch/frv/mb93090-mb00/pci-frv.h | 2 - arch/mn10300/unit-asb2305/pci-asb2305.h | 2 - arch/sh/drivers/pci/pci-sh4.h | 2 - arch/x86/pci/common.c | 7 --- arch/x86/pci/pcbios.c | 72 ------------------------------- arch/x86/pci/pci.h | 3 - include/asm-sh/mpc1211/pci.h | 2 - 8 files changed, 0 insertions(+), 94 deletions(-)
Documentation/kernel-parameters.txt +0 -4
@@ -1393,10 +1393,6 @@ and is between 256 and 4096 characters. It is defined in the file nomsi [MSI] If the PCI_MSI kernel config parameter is enabled, this kernel boot option can be used to disable the use of MSI interrupts system-wide. - nosort [X86-32] Don't sort PCI devices according to - order given by the PCI BIOS. This sorting is - done to get a device order compatible with - older kernels. biosirq [X86-32] Use PCI BIOS calls to get the interrupt routing table. These calls are known to be buggy on several machines and they hang the machine
arch/frv/mb93090-mb00/pci-frv.h +0 -2
@@ -17,8 +17,6 @@#define PCI_PROBE_BIOS 0x0001#define PCI_PROBE_CONF1 0x0002#define PCI_PROBE_CONF2 0x0004 -#define PCI_NO_SORT 0x0100 -#define PCI_BIOS_SORT 0x0200#define PCI_NO_CHECKS 0x0400#define PCI_ASSIGN_ROMS 0x1000#define PCI_BIOS_IRQ_SCAN 0x2000
arch/mn10300/unit-asb2305/pci-asb2305.h +0 -2
@@ -23,8 +23,6 @@#define PCI_PROBE_BIOS 1#define PCI_PROBE_CONF1 2#define PCI_PROBE_CONF2 4 -#define PCI_NO_SORT 0x100 -#define PCI_BIOS_SORT 0x200#define PCI_NO_CHECKS 0x400#define PCI_ASSIGN_ROMS 0x1000#define PCI_BIOS_IRQ_SCAN 0x2000
arch/sh/drivers/pci/pci-sh4.h +0 -2
@@ -15,8 +15,6 @@#define PCI_PROBE_BIOS 1#define PCI_PROBE_CONF1 2#define PCI_PROBE_CONF2 4 -#define PCI_NO_SORT 0x100 -#define PCI_BIOS_SORT 0x200#define PCI_NO_CHECKS 0x400#define PCI_ASSIGN_ROMS 0x1000#define PCI_BIOS_IRQ_SCAN 0x2000
arch/x86/pci/common.c +0 -7
@@ -427,10 +427,6 @@ static int __init pcibios_init(void)if (pci_bf_sort >= pci_force_bf)pci_sort_breadthfirst (); -#ifdef CONFIG_PCI_BIOS -if ((pci_probe &PCI_BIOS_SORT ) && !(pci_probe &PCI_NO_SORT )) -pcibios_sort (); -#endif return 0 ; }
@@ -455,9 +451,6 @@ char * __devinit pcibios_setup(char *str) }else if (!strcmp (str,"nobios" )) { pci_probe &= ~PCI_PROBE_BIOS ;return NULL ; - }else if (!strcmp (str,"nosort" )) { - pci_probe |=PCI_NO_SORT ; -return NULL ; }else if (!strcmp (str,"biosirq" )) { pci_probe |=PCI_BIOS_IRQ_SCAN ;return NULL ;
arch/x86/pci/pcbios.c +0 -72
90 lines not on this page · raw message
arch/x86/pci/pci.h +0 -3
@@ -19,8 +19,6 @@#define PCI_PROBE_MASK 0x000f#define PCI_PROBE_NOEARLY 0x0010 -#define PCI_NO_SORT 0x0100 -#define PCI_BIOS_SORT 0x0200#define PCI_NO_CHECKS 0x0400#define PCI_USE_PIRQ_MASK 0x0800#define PCI_ASSIGN_ROMS 0x1000
@@ -101,7 +99,6 @@ extern int pci_direct_probe(void);extern void pci_direct_init (int type);extern void pci_pcbios_init (void );extern void pci_mmcfg_init (int type); -extern void pcibios_sort (void );/* pci-mmconfig.c */
include/asm-sh/mpc1211/pci.h +0 -2
@@ -24,8 +24,6 @@#define PCI_PROBE_BIOS 1#define PCI_PROBE_CONF1 2#define PCI_PROBE_CONF2 4 -#define PCI_NO_SORT 0x100 -#define PCI_BIOS_SORT 0x200#define PCI_NO_CHECKS 0x400#define PCI_ASSIGN_ROMS 0x1000#define PCI_BIOS_IRQ_SCAN 0x2000
Signature · 1 line
1.5.4
PATCH 9/12 PCI: make no_pci_devices() use the pci_bus_type list
In reply to Greg KHno_pci_devices() should use the driver core list of PCI devices, not our "separate" one.
--- drivers/pci/probe.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-)
drivers/pci/probe.c +14 -3
@@ -22,16 +22,27 @@ EXPORT_SYMBOL(pci_root_buses);LIST_HEAD (pci_devices); + +static int find_anything (struct device *dev,void *data) +{ +return 1 ; +} +/* * Some device drivers need know if pci is initiated. * Basically, we think pci is not initiated when there -* is no device in list of pci_devices. +* is no device to be found on the pci_bus_type. */ int no_pci_devices (void ) { -return list_empty (&pci_devices); -} +struct device *dev; +int no_devices; + dev =bus_find_device (&pci_bus_type,NULL ,NULL , find_anything); + no_devices = (dev ==NULL ); +put_device (dev); +return no_devices; +}EXPORT_SYMBOL (no_pci_devices);#ifdef HAVE_PCI_LEGACY
Signature · 1 line
1.5.4
PATCH 10/12 PCI: add is_added flag to struct pci_dev
In reply to Greg KHThis lets us check if the device is really added to the driver core or not, which is what we need when walking some of the bus lists. The flag is there in anticipation of getting rid of the other PCI device list, which is what we used to check in this situation.
--- arch/powerpc/platforms/pseries/pci_dlpar.c | 7 ++----- drivers/pci/bus.c | 11 ++++------- drivers/pci/probe.c | 2 +- drivers/pci/remove.c | 6 ++---- include/linux/pci.h | 1 + 5 files changed, 10 insertions(+), 17 deletions(-)
arch/powerpc/platforms/pseries/pci_dlpar.c +2 -5
@@ -88,11 +88,8 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus)struct pci_dev *dev;list_for_each_entry (dev, &bus->devices, bus_list) { -/* -* Skip already-present devices (which are on the -* global device list.) -*/ -if (list_empty (&dev->global_list)) { +/* Skip already-added devices */ +if (!dev->is_added) {int i;/* Fill device archdata and setup iommu table */
drivers/pci/bus.c +4 -7
@@ -84,6 +84,7 @@ int pci_bus_add_device(struct pci_dev *dev)if (retval)return retval; + dev->is_added =1 ;down_write (&pci_bus_sem);list_add_tail (&dev->global_list, &pci_devices);up_write (&pci_bus_sem);
@@ -112,11 +113,8 @@ void pci_bus_add_devices(struct pci_bus *bus)int retval;list_for_each_entry (dev, &bus->devices, bus_list) { -/* -* Skip already-present devices (which are on the -* global device list.) -*/ -if (!list_empty (&dev->global_list)) +/* Skip already-added devices */ +if (dev->is_added)continue ; retval =pci_bus_add_device (dev);if (retval)
@@ -124,8 +122,7 @@ void pci_bus_add_devices(struct pci_bus *bus) }list_for_each_entry (dev, &bus->devices, bus_list) { - -BUG_ON (list_empty (&dev->global_list)); +BUG_ON (!dev->is_added);/* * If there is an unattached subordinate bus, attach
drivers/pci/probe.c +1 -1
@@ -984,7 +984,7 @@ EXPORT_SYMBOL(pci_scan_single_device);* * Scan a PCI slot on the specified PCI bus for devices, adding * discovered devices to the @bus->devices list. New devices -* will have an empty dev->global_list head. +* will not have is_added set. */ int pci_scan_slot (struct pci_bus *bus,int devfn) {
drivers/pci/remove.c +2 -4
@@ -18,13 +18,11 @@ static void pci_free_resources(struct pci_dev *dev)static void pci_stop_dev (struct pci_dev *dev) { -if (!dev->global_list.next) -return ; - -if (!list_empty (&dev->global_list)) { +if (dev->is_added) {pci_proc_detach_device (dev);pci_remove_sysfs_dev_files (dev);device_unregister (&dev->dev); + dev->is_added =0 ;down_write (&pci_bus_sem);list_del (&dev->global_list); dev->global_list.next = dev->global_list.prev =NULL ;
include/linux/pci.h +1 -0
@@ -181,6 +181,7 @@ struct pci_dev { unsigned int transparent:1; /* Transparent PCI bridge */ unsigned int multifunction:1;/* Part of multi-function device *//* keep track of device state */ + unsigned int is_added:1; unsigned int is_busmaster:1; /* device is busmaster */ unsigned int no_msi:1; /* device may not use msi */ unsigned int no_d1d2:1; /* only allow d0 or d3 */
Signature · 1 line
1.5.4
PATCH 11/12 PCI: remove pcibious_fixup_ghosts()
In reply to Greg KHThis function was obviously never being used since early 2.5 days as any device that it would try to remove would never really be removed from the system due to the PCI device list being held in the driver core, not the general list of PCI devices.
As we have not had a single report of a problem here in 4 years, I think it's safe to remove now.
--- arch/frv/mb93090-mb00/pci-vdk.c | 53 -------------------------------------- arch/x86/pci/common.c | 54 --------------------------------------- 2 files changed, 0 insertions(+), 107 deletions(-)
arch/frv/mb93090-mb00/pci-vdk.c +0 -53
@@ -199,58 +199,6 @@ static struct pci_ops * __init pci_check_direct(void) }/* -* Several buggy motherboards address only 16 devices and mirror -* them to next 16 IDs. We try to detect this `feature' on all -* primary buses (those containing host bridges as they are -* expected to be unique) and remove the ghost devices. -*/ - -static void __init pcibios_fixup_ghosts (struct pci_bus *b) -{ -struct list_head *ln, *mn; -struct pci_dev *d, *e; -int mirror =PCI_DEVFN (16 ,0 ); -int seen_host_bridge =0 ; -int i; - -for (ln=b->devices.next; ln != &b->devices; ln=ln->next) { - d =pci_dev_b (ln); -if ((d->class >>8 ) ==PCI_CLASS_BRIDGE_HOST ) - seen_host_bridge++; -for (mn=ln->next; mn != &b->devices; mn=mn->next) { - e =pci_dev_b (mn); -if (e->devfn != d->devfn + mirror || - e->vendor != d->vendor || - e->device != d->device || - e->class != d->class) -continue ; -for (i=0 ; i<PCI_NUM_RESOURCES ; i++) -if (e->resource[i].start != d->resource[i].start || - e->resource[i].end != d->resource[i].end || - e->resource[i].flags != d->resource[i].flags) -continue ; -break ; - } -if (mn == &b->devices) -return ; - } -if (!seen_host_bridge) -return ; -printk ("PCI: Ignoring ghost devices on bus %02x\n" , b->number); - - ln = &b->devices; -while (ln->next != &b->devices) { - d =pci_dev_b (ln->next); -if (d->devfn >= mirror) { -list_del (&d->global_list); -list_del (&d->bus_list); -kfree (d); - }else - ln = ln->next; - } -} - -/* * Discover remaining PCI buses in case there are peer host bridges. * We use the number of last PCI bus provided by the PCI BIOS. */
@@ -356,7 +304,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)#if 0 printk ("### PCIBIOS_FIXUP_BUS(%d)\n" ,bus->number);#endif -pcibios_fixup_ghosts (bus);pci_read_bridge_bases (bus);if (bus->number ==0 ) {
arch/x86/pci/common.c +0 -54
66 lines not on this page · raw message
Signature · 1 line
1.5.4
PATCH 12/12 PCI: remove global list of PCI devices
In reply to Greg KHThis patch finally removes the global list of PCI devices. We are relying entirely on the list held in the driver core now, and do not need a separate "shadow" list as no one uses it.
--- drivers/pci/bus.c | 4 ---- drivers/pci/probe.c | 39 +-------------------------------------- drivers/pci/remove.c | 4 ---- include/linux/pci.h | 3 --- 4 files changed, 1 insertions(+), 49 deletions(-)
drivers/pci/bus.c +0 -4
@@ -85,10 +85,6 @@ int pci_bus_add_device(struct pci_dev *dev)return retval; dev->is_added =1 ; -down_write (&pci_bus_sem); -list_add_tail (&dev->global_list, &pci_devices); -up_write (&pci_bus_sem); -pci_proc_attach_device (dev);pci_create_sysfs_dev_files (dev);return 0 ;
drivers/pci/probe.c +1 -38
@@ -20,8 +20,6 @@LIST_HEAD (pci_root_buses);EXPORT_SYMBOL (pci_root_buses); -LIST_HEAD (pci_devices); -static int find_anything (struct device *dev,void *data) {
@@ -860,7 +858,6 @@ struct pci_dev *alloc_pci_dev(void)if (!dev)return NULL ; -INIT_LIST_HEAD (&dev->global_list);INIT_LIST_HEAD (&dev->bus_list);pci_msi_init_pci_dev (dev);
@@ -957,7 +954,6 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)* Add the device to our list of discovered devices * and the bus list for fixup functions, etc. */ -INIT_LIST_HEAD (&dev->global_list);down_write (&pci_bus_sem);list_add_tail (&dev->bus_list, &bus->devices);up_write (&pci_bus_sem);
@@ -1186,7 +1182,7 @@ static void __init pci_insertion_sort_klist(struct pci_dev *a, struct list_headlist_move_tail (&a->dev.knode_bus.n_node, list); } -static void __init pci_sort_breadthfirst_klist (void ) +void __init pci_sort_breadthfirst (void ) {LIST_HEAD (sorted_devices);struct list_head *pos, *tmp;
@@ -1207,36 +1203,3 @@ static void __init pci_sort_breadthfirst_klist(void)list_splice (&sorted_devices, &device_klist->k_list);spin_unlock (&device_klist->k_lock); } - -static void __init pci_insertion_sort_devices (struct pci_dev *a,struct list_head *list) -{ -struct pci_dev *b; - -list_for_each_entry (b, list, global_list) { -if (pci_sort_bf_cmp (a, b) <=0 ) { -list_move_tail (&a->global_list, &b->global_list); -return ; - } - } -list_move_tail (&a->global_list, list); -} - -static void __init pci_sort_breadthfirst_devices (void ) -{ -LIST_HEAD (sorted_devices); -struct pci_dev *dev, *tmp; - -down_write (&pci_bus_sem); -list_for_each_entry_safe (dev, tmp, &pci_devices, global_list) { -pci_insertion_sort_devices (dev, &sorted_devices); - } -list_splice (&sorted_devices, &pci_devices); -up_write (&pci_bus_sem); -} - -void __init pci_sort_breadthfirst (void ) -{ -pci_sort_breadthfirst_devices (); -pci_sort_breadthfirst_klist (); -} -
drivers/pci/remove.c +0 -4
@@ -23,10 +23,6 @@ static void pci_stop_dev(struct pci_dev *dev)pci_remove_sysfs_dev_files (dev);device_unregister (&dev->dev); dev->is_added =0 ; -down_write (&pci_bus_sem); -list_del (&dev->global_list); - dev->global_list.next = dev->global_list.prev =NULL ; -up_write (&pci_bus_sem); } }
include/linux/pci.h +0 -3
@@ -132,7 +132,6 @@ struct pci_cap_saved_state {* The pci_dev structure is used to describe PCI devices. */ struct pci_dev { -struct list_head global_list;/* node in list of all PCI devices */ struct list_head bus_list;/* node in per-bus list */ struct pci_bus *bus;/* bus this device is on */ struct pci_bus *subordinate;/* bus this device bridges to */
@@ -206,7 +205,6 @@ struct pci_dev {extern struct pci_dev *alloc_pci_dev (void ); -#define pci_dev_g (n) list_entry(n, struct pci_dev, global_list)#define pci_dev_b (n) list_entry(n, struct pci_dev, bus_list)#define to_pci_dev (n) container_of(n, struct pci_dev, dev)#define for_each_pci_dev (d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
@@ -439,7 +437,6 @@ extern struct bus_type pci_bus_type;/* Do NOT directly access these two variables, unless you are arch specific pci * code, or pci core code. */ extern struct list_head pci_root_buses;/* list of all known PCI buses */ -extern struct list_head pci_devices;/* list of all devices */ /* Some device drivers need know if pci is initiated */ extern int no_pci_devices (void );
Signature · 1 line
1.5.4