]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: Use generic pci_mmap_resource_range()
authorArnd Bergmann <arnd@arndb.de>
Fri, 15 Jul 2022 15:36:17 +0000 (17:36 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 29 Jul 2022 17:09:32 +0000 (12:09 -0500)
commitc9d0b354316d8caf80c87bdbd9047d55ef0062b4
tree205497cbb26cc3eb9c7a3f93b8dcc8f765273ec8
parent0e8111d57495bfb4dc55efcc42f2d665fd60c9a1
sparc: Use generic pci_mmap_resource_range()

The main feature of the sparc-specific implementation of
pci_mmap_resource_range() is that it allows mapping the entire PCI I/O
space for a PCI host bridge using the /proc/bus/pci interface on a bridge
device.

The generic implementation cannot do this, but it also appears that this
got broken for sparc by commit 003a00ffabd9 ("PCI: check mmap range of
/proc/bus/pci files too"), which enforces that each address is part of a
BAR for kernels after 2.6.28.

Remove it all, assuming that the corresponding user space code has already
been changed to access /dev/ioport instead a long time ago.  Add
pci_iobar_pfn() to make it possible to map I/O resources. This is adapted
from the powerpc version.

Link: https://lore.kernel.org/lkml/1519887203.622.3.camel@infradead.org/t/
Link: https://lore.kernel.org/r/20220715153617.3393420-2-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/sparc/include/asm/pci.h
arch/sparc/kernel/pci.c