linux/arch/microblaze
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
..
boot microblaze: Remove *.dtb files in make clean 2015-02-10 16:24:39 +01:00
configs KEYS: CONFIG_KEYS_DEBUG_PROC_KEYS is no longer an option 2016-02-10 10:13:27 +00:00
include PCI: Unify pci_resource_to_user() declarations 2016-06-17 14:43:34 -05:00
kernel microblaze: Wire up userfaultfd, membarrier, mlock2 syscalls 2016-05-16 09:18:01 +02:00
lib microblaze: Change libgcc-style functions from lib-y to obj-y 2014-07-18 14:26:09 +02:00
mm mm/fault, arch: Use pagefault_disable() to check for disabled pagefaults in the handler 2015-05-19 08:39:15 +02:00
oprofile microblaze: Core oprofile configs and hooks 2009-12-14 08:45:07 +01:00
pci microblaze/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus() 2016-06-17 14:43:34 -05:00
Kconfig Merge branch 'hash' of git://ftp.sciencehorizons.net/linux 2016-05-28 16:15:25 -07:00
Kconfig.debug microblaze: remove obsolete DEBUG_BOOTMEM 2011-01-10 09:29:51 +01:00
Kconfig.platform microblaze: Remove platform folder 2014-04-07 13:45:21 +02:00
Makefile microblaze: Remove platform folder 2014-04-07 13:45:21 +02:00