aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-acpi.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-02-16 13:58:34 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-02-16 13:58:34 -0500
commit181380b702eee1a9aca51354d7b87c7b08541fcf (patch)
treec95dc8c7649fe97c18a99d3ee69ad014adf8cfaa /drivers/pci/pci-acpi.c
parentbe6d2867b4f68a575c78fa368abd3ad49980c514 (diff)
PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers
Previously, we cached _PRT (PCI routing table, ACPI 5.0 sec 6.2.12) contents and associated each _PRT entry with a PCI bus number. The bus number association means dependencies on PCI device enumeration and bus number assignment, as well as on the PCI/ACPI binding process. After 4f535093cf ("PCI: Put pci_dev in device tree as early as possible"), these dependencies caused the IRQ issues reported by Peter: pci 0000:00:1e.0: PCI bridge to [bus 09] (subtractive decode) pci 0000:00:1e.0: can't derive routing for PCI INT A snd_ctxfi 0000:09:02.0: PCI INT A: no GSI - using ISA IRQ 5 irq 18: nobody cared (try booting with the "irqpoll" option) This patch removes _PRT caching. Instead, we evaluate _PRT as needed in the pci_enable_device() path. This also removes the dependency on PCI bus numbers: we can simply look at the _PRT associated with each bridge as we walk upstream toward the root. [bhelgaas: changelog] Reference: https://bugzilla.kernel.org/show_bug.cgi?id=53561 Reported-and-tested-by: Peter Hurley <peter@hurleysoftware.com> Suggested-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r--drivers/pci/pci-acpi.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 42736e213f25..9ba9df5f6161 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -325,25 +325,6 @@ static void pci_acpi_setup(struct device *dev)
325 struct pci_dev *pci_dev = to_pci_dev(dev); 325 struct pci_dev *pci_dev = to_pci_dev(dev);
326 acpi_handle handle = ACPI_HANDLE(dev); 326 acpi_handle handle = ACPI_HANDLE(dev);
327 struct acpi_device *adev; 327 struct acpi_device *adev;
328 acpi_status status;
329 acpi_handle dummy;
330
331 /*
332 * Evaluate and parse _PRT, if exists. This code allows parsing of
333 * _PRT objects within the scope of non-bridge devices. Note that
334 * _PRTs within the scope of a PCI bridge assume the bridge's
335 * subordinate bus number.
336 *
337 * TBD: Can _PRTs exist within the scope of non-bridge PCI devices?
338 */
339 status = acpi_get_handle(handle, METHOD_NAME__PRT, &dummy);
340 if (ACPI_SUCCESS(status)) {
341 unsigned char bus;
342
343 bus = pci_dev->subordinate ?
344 pci_dev->subordinate->number : pci_dev->bus->number;
345 acpi_pci_irq_add_prt(handle, pci_domain_nr(pci_dev->bus), bus);
346 }
347 328
348 acpi_power_resource_register_device(dev, handle); 329 acpi_power_resource_register_device(dev, handle);
349 if (acpi_bus_get_device(handle, &adev) || !adev->wakeup.flags.valid) 330 if (acpi_bus_get_device(handle, &adev) || !adev->wakeup.flags.valid)
@@ -359,7 +340,6 @@ static void pci_acpi_setup(struct device *dev)
359 340
360static void pci_acpi_cleanup(struct device *dev) 341static void pci_acpi_cleanup(struct device *dev)
361{ 342{
362 struct pci_dev *pci_dev = to_pci_dev(dev);
363 acpi_handle handle = ACPI_HANDLE(dev); 343 acpi_handle handle = ACPI_HANDLE(dev);
364 struct acpi_device *adev; 344 struct acpi_device *adev;
365 345
@@ -369,10 +349,6 @@ static void pci_acpi_cleanup(struct device *dev)
369 pci_acpi_remove_pm_notifier(adev); 349 pci_acpi_remove_pm_notifier(adev);
370 } 350 }
371 acpi_power_resource_unregister_device(dev, handle); 351 acpi_power_resource_unregister_device(dev, handle);
372
373 if (pci_dev->subordinate)
374 acpi_pci_irq_del_prt(pci_domain_nr(pci_dev->bus),
375 pci_dev->subordinate->number);
376} 352}
377 353
378static struct acpi_bus_type acpi_pci_bus = { 354static struct acpi_bus_type acpi_pci_bus = {