Files
android_kernel_xiaomi_sm8450/arch/sparc/kernel
Bjorn Helgaas 3b146b24a4 sparc/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.  On sparc, these are PCI bus addresses, i.e., raw BAR values.

Previously pci_resource_to_user() computed the user address by
subtracting either pbm->io_space.start or pbm->mem_space.start from the
resource start.

We've already told the PCI core about those offsets here:

  pci_scan_one_pbm()
    pci_add_resource_offset(&resources, &pbm->io_space, pbm->io_space.start);
    pci_add_resource_offset(&resources, &pbm->mem_space, pbm->mem_space.start);
    pci_add_resource_offset(&resources, &pbm->mem64_space, pbm->mem_space.start);

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:45:03 -05:00
..
2008-12-04 09:17:15 -08:00
2014-05-18 19:01:30 -07:00
2014-05-18 19:01:29 -07:00
2008-12-04 09:17:21 -08:00
2008-12-04 09:17:21 -08:00
2012-07-26 16:46:15 -07:00
2015-03-19 18:54:49 -07:00
2016-01-31 11:06:24 -08:00
2015-05-05 13:35:39 -06:00
2016-03-20 21:28:58 -07:00
2008-12-04 09:17:21 -08:00
2008-12-04 09:17:21 -08:00
2014-08-26 13:45:55 -04:00
2015-03-19 10:17:22 -05:00
2014-08-26 13:45:55 -04:00
2008-12-04 09:17:21 -08:00
2015-03-19 18:54:49 -07:00
2013-06-13 22:12:14 +01:00
2012-03-28 18:30:03 +01:00
2016-01-31 11:06:24 -08:00
2014-08-26 13:45:55 -04:00
2008-12-04 09:17:21 -08:00
2014-07-21 22:27:56 -07:00
2016-03-20 21:28:58 -07:00
2014-09-30 14:17:08 -07:00