diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 00:18:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 00:18:18 -0500 |
commit | 556f12f602ac0a18a82ca83e9f8e8547688fc633 (patch) | |
tree | d4051f6dd57968c8e8e660ad117c5bedc2aa7e8e /include | |
parent | fffddfd6c8e0c10c42c6e2cc54ba880fcc36ebbb (diff) | |
parent | 018ba0a6efada61b9bc17500101d81c3d35807c2 (diff) |
Merge tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
"Host bridge hotplug
- Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
- Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
- Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
- Stop caching _PRT and make independent of bus numbers (Yinghai Lu)
PCI device hotplug
- Clean up cpqphp dead code (Sasha Levin)
- Disable ARI unless device and upstream bridge support it (Yijing Wang)
- Initialize all hot-added devices (not functions 0-7) (Yijing Wang)
Power management
- Don't touch ASPM if disabled (Joe Lawrence)
- Fix ASPM link state management (Myron Stowe)
Miscellaneous
- Fix PCI_EXP_FLAGS accessor (Alex Williamson)
- Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
- Document hotplug resource and MPS parameters (Yijing Wang)
- Add accessor for PCIe capabilities (Myron Stowe)
- Drop pciehp suspend/resume messages (Paul Bolle)
- Make pci_slot built-in only (not a module) (Jiang Liu)
- Remove unused PCI/ACPI bind ops (Jiang Liu)
- Removed used pci_root_bus (Bjorn Helgaas)"
* tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits)
PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers
PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS
ACPI / PCI: Make pci_slot built-in only, not a module
PCI/PM: Clear state_saved during suspend
PCI: Use atomic_inc_return() rather than atomic_add_return()
PCI: Catch attempts to disable already-disabled devices
PCI: Disable Bus Master unconditionally in pci_device_shutdown()
PCI: acpiphp: Remove dead code for PCI host bridge hotplug
PCI: acpiphp: Create companion ACPI devices before creating PCI devices
PCI: Remove unused "rc" in virtfn_add_bus()
PCI: pciehp: Drop suspend/resume ENTRY messages
PCI/ASPM: Don't touch ASPM if forcibly disabled
PCI/ASPM: Deallocate upstream link state even if device is not PCIe
PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
PCI: Document hpiosize= and hpmemsize= resource reservation parameters
PCI: Use PCI Express Capability accessor
PCI: Introduce accessor to retrieve PCIe Capabilities Register
PCI: Put pci_dev in device tree as early as possible
PCI: Skip attaching driver in device_add()
PCI: acpiphp: Keep driver loaded even if no slots found
...
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acpi_bus.h | 10 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 5 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 2 | ||||
-rw-r--r-- | include/linux/pci.h | 15 |
4 files changed, 23 insertions, 9 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 227ba7dc293d..e65278f560c4 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -323,6 +323,15 @@ struct acpi_eject_event { | |||
323 | u32 event; | 323 | u32 event; |
324 | }; | 324 | }; |
325 | 325 | ||
326 | struct acpi_hp_work { | ||
327 | struct work_struct work; | ||
328 | acpi_handle handle; | ||
329 | u32 type; | ||
330 | void *context; | ||
331 | }; | ||
332 | void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context, | ||
333 | void (*func)(struct work_struct *work)); | ||
334 | |||
326 | extern struct kobject *acpi_kobj; | 335 | extern struct kobject *acpi_kobj; |
327 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); | 336 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); |
328 | void acpi_bus_private_data_handler(acpi_handle, void *); | 337 | void acpi_bus_private_data_handler(acpi_handle, void *); |
@@ -454,7 +463,6 @@ struct acpi_pci_root { | |||
454 | /* helper */ | 463 | /* helper */ |
455 | acpi_handle acpi_get_child(acpi_handle, u64); | 464 | acpi_handle acpi_get_child(acpi_handle, u64); |
456 | int acpi_is_root_bridge(acpi_handle); | 465 | int acpi_is_root_bridge(acpi_handle); |
457 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | ||
458 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | 466 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); |
459 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)ACPI_HANDLE(dev)) | 467 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)ACPI_HANDLE(dev)) |
460 | 468 | ||
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 8b1d7a6a9695..627749af0ba7 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -90,11 +90,6 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, | |||
90 | int *polarity, char **name); | 90 | int *polarity, char **name); |
91 | int acpi_pci_link_free_irq(acpi_handle handle); | 91 | int acpi_pci_link_free_irq(acpi_handle handle); |
92 | 92 | ||
93 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | ||
94 | |||
95 | int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus); | ||
96 | void acpi_pci_irq_del_prt(int segment, int bus); | ||
97 | |||
98 | /* ACPI PCI Device Binding (pci_bind.c) */ | 93 | /* ACPI PCI Device Binding (pci_bind.c) */ |
99 | 94 | ||
100 | struct pci_bus; | 95 | struct pci_bus; |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 7d2a9eaab9eb..5b3d2bd4813a 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -194,8 +194,6 @@ void acpi_os_fixed_event_count(u32 fixed_event_number); | |||
194 | /* | 194 | /* |
195 | * Threads and Scheduling | 195 | * Threads and Scheduling |
196 | */ | 196 | */ |
197 | extern struct workqueue_struct *kacpi_hotplug_wq; | ||
198 | |||
199 | acpi_thread_id acpi_os_get_thread_id(void); | 197 | acpi_thread_id acpi_os_get_thread_id(void); |
200 | 198 | ||
201 | acpi_status | 199 | acpi_status |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 6fa4dd2a3b9e..2461033a7987 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -286,6 +286,7 @@ struct pci_dev { | |||
286 | unsigned int irq; | 286 | unsigned int irq; |
287 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ | 287 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ |
288 | 288 | ||
289 | bool match_driver; /* Skip attaching driver */ | ||
289 | /* These fields are used by common fixups */ | 290 | /* These fields are used by common fixups */ |
290 | unsigned int transparent:1; /* Transparent PCI bridge */ | 291 | unsigned int transparent:1; /* Transparent PCI bridge */ |
291 | unsigned int multifunction:1;/* Part of multi-function device */ | 292 | unsigned int multifunction:1;/* Part of multi-function device */ |
@@ -378,6 +379,8 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, | |||
378 | void (*release_fn)(struct pci_host_bridge *), | 379 | void (*release_fn)(struct pci_host_bridge *), |
379 | void *release_data); | 380 | void *release_data); |
380 | 381 | ||
382 | int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge); | ||
383 | |||
381 | /* | 384 | /* |
382 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond | 385 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond |
383 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for | 386 | * to P2P or CardBus bridge windows) go in a table. Additional ones (for |
@@ -674,6 +677,7 @@ extern struct list_head pci_root_buses; /* list of all known PCI buses */ | |||
674 | /* Some device drivers need know if pci is initiated */ | 677 | /* Some device drivers need know if pci is initiated */ |
675 | extern int no_pci_devices(void); | 678 | extern int no_pci_devices(void); |
676 | 679 | ||
680 | void pcibios_resource_survey_bus(struct pci_bus *bus); | ||
677 | void pcibios_fixup_bus(struct pci_bus *); | 681 | void pcibios_fixup_bus(struct pci_bus *); |
678 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 682 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
679 | /* Architecture specific versions may override this (weak) */ | 683 | /* Architecture specific versions may override this (weak) */ |
@@ -1700,12 +1704,21 @@ static inline bool pci_is_pcie(struct pci_dev *dev) | |||
1700 | } | 1704 | } |
1701 | 1705 | ||
1702 | /** | 1706 | /** |
1707 | * pcie_caps_reg - get the PCIe Capabilities Register | ||
1708 | * @dev: PCI device | ||
1709 | */ | ||
1710 | static inline u16 pcie_caps_reg(const struct pci_dev *dev) | ||
1711 | { | ||
1712 | return dev->pcie_flags_reg; | ||
1713 | } | ||
1714 | |||
1715 | /** | ||
1703 | * pci_pcie_type - get the PCIe device/port type | 1716 | * pci_pcie_type - get the PCIe device/port type |
1704 | * @dev: PCI device | 1717 | * @dev: PCI device |
1705 | */ | 1718 | */ |
1706 | static inline int pci_pcie_type(const struct pci_dev *dev) | 1719 | static inline int pci_pcie_type(const struct pci_dev *dev) |
1707 | { | 1720 | { |
1708 | return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4; | 1721 | return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4; |
1709 | } | 1722 | } |
1710 | 1723 | ||
1711 | void pci_request_acs(void); | 1724 | void pci_request_acs(void); |