]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: add struct pci_host_bridge_window with CPU/bus address offset
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Feb 2012 03:19:00 +0000 (20:19 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Feb 2012 03:19:00 +0000 (20:19 -0700)
commit051e6d5d8d5ef5a1536e101fc4683fdd365ffcd7
tree2480b5ade8937d18104c5ecc1423ca1eac1b154e
parentad3412f717c89736c20421eb50ef98bdc9e673c3
PCI: add struct pci_host_bridge_window with CPU/bus address offset

Some PCI host bridges apply an address offset, so bus addresses on PCI are
different from CPU addresses.  This patch adds a way for architectures to
tell the PCI core about this offset.  For example:

    LIST_HEAD(resources);
    pci_add_resource_offset(&resources, host->io_space, host->io_offset);
    pci_add_resource_offset(&resources, host->mem_space, host->mem_offset);
    pci_scan_root_bus(parent, bus, ops, sysdata, &resources);

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/bus.c
drivers/pci/probe.c
include/linux/pci.h