]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - lib/Kconfig
UBUNTU: SAUCE: LIBIO: Introduce a generic PIO mapping method
authorzhichang.yuan <yuanzhichang@hisilicon.com>
Mon, 13 Mar 2017 02:42:37 +0000 (10:42 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 17 May 2017 16:36:49 +0000 (13:36 -0300)
commitaf3ea169a475eddf7de6502d2adbdf31697f74e3
tree74c822bb4727d06f53fc07e49a5f25fb79e693ba
parent4730568e8e5f7b8f88cbdb75376884ae8ab4f389
UBUNTU: SAUCE: LIBIO: Introduce a generic PIO mapping method

BugLink: http://bugs.launchpad.net/bugs/1677319
In commit 41f8bba7f55(of/pci: Add pci_register_io_range() and
pci_pio_to_address()), a new I/O space management was supported. With that
driver, the I/O ranges configured for PCI/PCIE hosts on some architectures can
be mapped to logical PIO, converted easily between CPU address and the
corresponding logicial PIO. Based on this, PCI I/O devices can be accessed in a
memory read/write way through the unified in/out accessors.

But on some archs/platforms, there are bus hosts which access I/O peripherals
with host-local I/O port addresses rather than memory addresses after
memory-mapped.
To support those devices, a more generic I/O mapping method is introduced here.
Through this patch, both the CPU addresses and the host-local port can be
mapped into logical PIO, then all the I/O accesses to either PCI MMIO devices or
host-local I/O peripherals can be unified into the existing I/O accessors
defined asm-generic/io.h and be redirected to the right device-specific hooks
based on the input logical PIO.

Signed-off-by: zhichang.yuan <yuanzhichang@hisilicon.com>
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
(v7 submission)
Reference: http://www.spinics.net/lists/linux-pci/msg59175.html
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/asm-generic/io.h
include/linux/io.h
include/linux/libio.h [new file with mode: 0644]
lib/Kconfig
lib/Makefile
lib/libio.c [new file with mode: 0644]