linux/drivers/pci
Alex Chiang f46753c5e3 PCI: introduce pci_slot
Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
hotplug driver is loaded, but PCI slots have attributes such as address,
speed, width, etc.  that are not related to hotplug at all.

Introduce pci_slot as the primary data structure and kobject model.
Hotplug attributes described in hotplug_slot become a secondary
structure associated with the pci_slot.

This patch only creates the infrastructure that allows the separation of
PCI slot attributes and hotplug attributes.  In this patch, the PCI
hotplug core remains the only user of this infrastructure, and thus,
/sys/bus/pci/slots/ will still only become populated when a hotplug
driver is loaded.

A later patch in this series will add a second user of this new
infrastructure and demonstrate splitting the task of exposing pci_slot
attributes from hotplug_slot attributes.

  - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
    subsidiary structure.
    o pci_create_slot() creates and registers a slot with the PCI core
    o pci_slot_add_hotplug() gives it hotplug capability

  - Change the prototype of pci_hp_register() to take the bus and
    slot number (on parent bus) as parameters.

  - Remove all the ->get_address methods since this functionality is
    now handled by pci_slot directly.

[achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
Tested-by: Badari Pulavarty <pbadari@us.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: make headers_check happy]
[akpm@linux-foundation.org: nuther build fix]
[akpm@linux-foundation.org: fix typo in #include]
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Cc: Greg KH <greg@kroah.com>
Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10 14:37:03 -07:00
..
hotplug PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
pcie PCIe: fix 'symbol not declared' sparse warnings 2008-06-10 10:59:55 -07:00
.gitignore
Kconfig PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
Makefile PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
access.c PCI: Expose PCI VPD through sysfs 2008-04-20 21:47:07 -07:00
bus.c PCI: remove global list of PCI devices 2008-04-20 21:47:02 -07:00
dmar.c copyright owner and author clean up for intel iommu and related files 2008-02-23 17:12:14 -08:00
hotplug-pci.c PCI: fix section mismatch warning in pci_scan_child_bus 2008-03-04 15:07:03 -08:00
hotplug.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
htirq.c PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c 2006-12-20 10:54:42 -08:00
intel-iommu.c PCI: eliminate double kfree in intel-iommu initialization 2008-06-10 10:59:54 -07:00
intel-iommu.h copyright owner and author clean up for intel iommu and related files 2008-02-23 17:12:14 -08:00
iova.c PCI: iova RB tree setup tweak 2008-04-20 21:47:06 -07:00
iova.h PCI: pci-iommu-iotlb-flushing-speedup 2008-04-20 21:47:13 -07:00
msi.c PCI/MSI: skip calling pci_find_capability from msi_set_mask_bits 2008-06-10 10:59:49 -07:00
msi.h PCI: Make some MSI-X #defines generic 2006-12-01 14:36:56 -08:00
pci-acpi.c pci-acpi: formatting cleanups for _OSC 2008-06-10 10:59:49 -07:00
pci-driver.c PCI: implement new suspend/resume callbacks 2008-06-10 10:59:51 -07:00
pci-sysfs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6 2008-04-21 15:58:35 -07:00
pci.c PCI: remove CVS keywords 2008-06-10 10:59:49 -07:00
pci.h PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
probe.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
proc.c PCI: remove CVS keywords 2008-06-10 10:59:49 -07:00
quirks.c PCI: unhide the SMBus on the Compaq Deskpro EN 2008-06-10 11:57:26 -07:00
remove.c PCI: add PCI Express ASPM support 2008-04-20 21:47:03 -07:00
rom.c docbook: fix kernel-api source files 2008-03-03 10:47:14 -08:00
search.c PCI: clean up search.c a lot 2008-04-20 21:46:54 -07:00
setup-bus.c Fix cardbus resource allocation 2008-04-22 18:16:30 -07:00
setup-irq.c kobjects: fix up improper use of the kobject name field 2007-10-12 14:51:02 -07:00
setup-res.c PCI: clean up resource alignment management 2008-04-20 21:47:08 -07:00
slot.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
syscall.c PCI: remove unneeded lock_kernel() in drivers/pci/syscall.c. 2008-02-01 15:04:21 -08:00