diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-02-23 20:19:00 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-02-23 20:19:00 -0700 |
commit | 5bfa14ed9f3ca21fcecbcfbf4a848c002b740c41 (patch) | |
tree | dc28c99c694007fca535b906c1044101241abb73 /drivers/accessibility | |
parent | 0efd5aab41e18a1175f72641696cfda154ba6c87 (diff) |
PCI: convert bus addresses to resource when reading BARs
Some PCI host bridges translate CPU addresses to PCI bus addresses.
Previously, we initialized pci_dev resources with PCI bus addresses,
then converted them to CPU addresses later in arch-specific code
(pcibios_fixup_resources()), which leaves a window of time where the
pci_dev resources are incorrect.
This patch adds support in the core for this address translation.
When the arch creates the root bus, it can supply the host bridge
address translation information, and the core can use it to set the
pci_dev resources correctly from the beginning.
This gives us a way to fix the problem that quirks that run between device
discovery and pcibios_fixup_resources() fail because they use pci_dev
resources that haven't been converted. The reference below is to one
such problem that affected ARM and ia64.
Note that this patch has no effect until an arch starts using
pci_add_resource_offset() with a non-zero offset: before that, all
all host bridge windows have a zero offset and pci_bus_to_resource()
copies the pci_bus_region directly to the struct resource.
Reference: https://lkml.org/lkml/2009/10/12/405
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/accessibility')
0 files changed, 0 insertions, 0 deletions