diff options
| author | Yinghai Lu <yinghai@kernel.org> | 2013-02-16 13:58:34 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-02-16 13:58:34 -0500 |
| commit | 181380b702eee1a9aca51354d7b87c7b08541fcf (patch) | |
| tree | c95dc8c7649fe97c18a99d3ee69ad014adf8cfaa /drivers/acpi/pci_root.c | |
| parent | be6d2867b4f68a575c78fa368abd3ad49980c514 (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/acpi/pci_root.c')
| -rw-r--r-- | drivers/acpi/pci_root.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index fd59f57d3829..8545b1d22811 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
| @@ -434,7 +434,6 @@ static int acpi_pci_root_add(struct acpi_device *device) | |||
| 434 | acpi_status status; | 434 | acpi_status status; |
| 435 | int result; | 435 | int result; |
| 436 | struct acpi_pci_root *root; | 436 | struct acpi_pci_root *root; |
| 437 | acpi_handle handle; | ||
| 438 | struct acpi_pci_driver *driver; | 437 | struct acpi_pci_driver *driver; |
| 439 | u32 flags, base_flags; | 438 | u32 flags, base_flags; |
| 440 | bool is_osc_granted = false; | 439 | bool is_osc_granted = false; |
| @@ -489,16 +488,6 @@ static int acpi_pci_root_add(struct acpi_device *device) | |||
| 489 | acpi_device_name(device), acpi_device_bid(device), | 488 | acpi_device_name(device), acpi_device_bid(device), |
| 490 | root->segment, &root->secondary); | 489 | root->segment, &root->secondary); |
| 491 | 490 | ||
| 492 | /* | ||
| 493 | * PCI Routing Table | ||
| 494 | * ----------------- | ||
| 495 | * Evaluate and parse _PRT, if exists. | ||
| 496 | */ | ||
| 497 | status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle); | ||
| 498 | if (ACPI_SUCCESS(status)) | ||
| 499 | result = acpi_pci_irq_add_prt(device->handle, root->segment, | ||
| 500 | root->secondary.start); | ||
| 501 | |||
| 502 | root->mcfg_addr = acpi_pci_root_get_mcfg_addr(device->handle); | 491 | root->mcfg_addr = acpi_pci_root_get_mcfg_addr(device->handle); |
| 503 | 492 | ||
| 504 | /* | 493 | /* |
| @@ -623,7 +612,6 @@ out_del_root: | |||
| 623 | list_del(&root->node); | 612 | list_del(&root->node); |
| 624 | mutex_unlock(&acpi_pci_root_lock); | 613 | mutex_unlock(&acpi_pci_root_lock); |
| 625 | 614 | ||
| 626 | acpi_pci_irq_del_prt(root->segment, root->secondary.start); | ||
| 627 | end: | 615 | end: |
| 628 | kfree(root); | 616 | kfree(root); |
| 629 | return result; | 617 | return result; |
| @@ -631,8 +619,6 @@ end: | |||
| 631 | 619 | ||
| 632 | static int acpi_pci_root_remove(struct acpi_device *device, int type) | 620 | static int acpi_pci_root_remove(struct acpi_device *device, int type) |
| 633 | { | 621 | { |
| 634 | acpi_status status; | ||
| 635 | acpi_handle handle; | ||
| 636 | struct acpi_pci_root *root = acpi_driver_data(device); | 622 | struct acpi_pci_root *root = acpi_driver_data(device); |
| 637 | struct acpi_pci_driver *driver; | 623 | struct acpi_pci_driver *driver; |
| 638 | 624 | ||
| @@ -647,10 +633,6 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type) | |||
| 647 | device_set_run_wake(root->bus->bridge, false); | 633 | device_set_run_wake(root->bus->bridge, false); |
| 648 | pci_acpi_remove_bus_pm_notifier(device); | 634 | pci_acpi_remove_bus_pm_notifier(device); |
| 649 | 635 | ||
| 650 | status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle); | ||
| 651 | if (ACPI_SUCCESS(status)) | ||
| 652 | acpi_pci_irq_del_prt(root->segment, root->secondary.start); | ||
| 653 | |||
| 654 | pci_remove_root_bus(root->bus); | 636 | pci_remove_root_bus(root->bus); |
| 655 | 637 | ||
| 656 | mutex_lock(&acpi_pci_root_lock); | 638 | mutex_lock(&acpi_pci_root_lock); |
