WSL2-Linux-Kernel/arch/microblaze/pci
Bjorn Helgaas 0ad8f06d58 microblaze/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus()
"User" addresses are shown in /sys/devices/pci.../.../resource and
/proc/bus/pci/devices and used as mmap offsets for /proc/bus/pci/BB/DD.F
files.  For I/O port resources on microblaze, these are PCI bus addresses,
i.e., raw BAR values.

Previously pci_resource_to_user() computed the user address by subtracting
"hose->io_base_virt - _IO_BASE" from the resource start:

  pci_resource_to_user()
    if (IO)
      offset = (unsigned long)hose->io_base_virt - _IO_BASE;
    *start = rsrc->start - offset;

We've already told the PCI core about that "hose->io_base_virt - _IO_BASE"
offset:

  pcibios_setup_phb_resources()
    res = &hose->io_resource;
    pci_add_resource_offset(resources, res, hose->io_base_virt - _IO_BASE);

so pcibios_resource_to_bus() knows how to do that translation.

No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
2016-06-17 14:43:34 -05:00
..
Makefile microblaze/pci: Move the remains of pci_32.c to pci-common.c 2011-06-08 09:08:38 +10:00
indirect_pci.c microblaze: Fix coding style issues 2013-02-12 11:24:45 +01:00
iomap.c microblaze: Fix coding style issues 2013-02-12 11:24:45 +01:00
pci-common.c microblaze/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus() 2016-06-17 14:43:34 -05:00
xilinx_pci.c microblaze: Fix coding style issues 2013-02-12 11:24:45 +01:00