summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/hvtramp.S
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-06-17 21:43:34 +0200
committerBjorn Helgaas <bhelgaas@google.com>2016-06-17 21:44:44 +0200
commit38301358573be7398e43115170f2d76598c8d43b (patch)
tree9538e63222b11277930e6eb9beaa5d05b4b6651c /arch/sparc/kernel/hvtramp.S
parentmicroblaze/PCI: Implement pci_resource_to_user() with pcibios_resource_to_bus() (diff)
downloadlinux-38301358573be7398e43115170f2d76598c8d43b.tar.xz
linux-38301358573be7398e43115170f2d76598c8d43b.zip
powerpc/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 powerpc, 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; offset = pcibios_io_space_offset(); /* i.e., "offset = hose->io_base_virt - _IO_BASE" */ pci_add_resource_offset(resources, res, offset); 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>
Diffstat (limited to 'arch/sparc/kernel/hvtramp.S')
0 files changed, 0 insertions, 0 deletions