]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
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)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:33:46 +0000 (07:33 -0500)
commit90a4bbef14728a6f5cda0154a6613f2389a3336f
tree1d59d2447638276a2b86361e00bc5e02869a5fb4
parentf64d7ce3b13dc28651c79e08c0ead499b1ca7602
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: Seth Forshee <seth.forshee@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]