mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
f46753c5e3
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>
56 lines
1.4 KiB
Makefile
56 lines
1.4 KiB
Makefile
#
|
|
# Makefile for the PCI bus specific drivers.
|
|
#
|
|
|
|
obj-y += access.o bus.o probe.o remove.o pci.o quirks.o slot.o \
|
|
pci-driver.o search.o pci-sysfs.o rom.o setup-res.o
|
|
obj-$(CONFIG_PROC_FS) += proc.o
|
|
|
|
# Build PCI Express stuff if needed
|
|
obj-$(CONFIG_PCIEPORTBUS) += pcie/
|
|
|
|
obj-$(CONFIG_HOTPLUG) += hotplug.o
|
|
|
|
# Build the PCI Hotplug drivers if we were asked to
|
|
obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
|
|
ifdef CONFIG_HOTPLUG_PCI
|
|
obj-y += hotplug-pci.o
|
|
endif
|
|
|
|
# Build the PCI MSI interrupt support
|
|
obj-$(CONFIG_PCI_MSI) += msi.o
|
|
|
|
# Build the Hypertransport interrupt support
|
|
obj-$(CONFIG_HT_IRQ) += htirq.o
|
|
|
|
# Build Intel IOMMU support
|
|
obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
|
|
|
|
#
|
|
# Some architectures use the generic PCI setup functions
|
|
#
|
|
obj-$(CONFIG_X86) += setup-bus.o
|
|
obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o
|
|
obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o
|
|
obj-$(CONFIG_PARISC) += setup-bus.o
|
|
obj-$(CONFIG_SUPERH) += setup-bus.o setup-irq.o
|
|
obj-$(CONFIG_PPC32) += setup-irq.o
|
|
obj-$(CONFIG_PPC) += setup-bus.o
|
|
obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
|
|
obj-$(CONFIG_X86_VISWS) += setup-irq.o
|
|
obj-$(CONFIG_MN10300) += setup-bus.o
|
|
|
|
#
|
|
# ACPI Related PCI FW Functions
|
|
#
|
|
obj-$(CONFIG_ACPI) += pci-acpi.o
|
|
|
|
# Cardbus & CompactPCI use setup-bus
|
|
obj-$(CONFIG_HOTPLUG) += setup-bus.o
|
|
|
|
obj-$(CONFIG_PCI_SYSCALL) += syscall.o
|
|
|
|
ifeq ($(CONFIG_PCI_DEBUG),y)
|
|
EXTRA_CFLAGS += -DDEBUG
|
|
endif
|