Re: [PATCH V6 2/5] PCI: Adapt pci_register_io_range() for indirect-IO and PCI I/O translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 31/01/2017 00:15, Bjorn Helgaas wrote:
On Tue, Jan 24, 2017 at 03:05:22PM +0800, zhichang.yuan wrote:
After indirect-IO is introduced, system must can assigned indirect-IO devices
with logical I/O ranges which are different from those for PCI I/O devices.
Otherwise, I/O accessors can't identify whether the I/O port is for memory
mapped I/O or indirect-IO.
As current helper, pci_register_io_range(), is used for PCI I/O ranges
registration and translation, indirect-IO devices should also apply these
helpers to manage the I/O ranges. It will be easy to ensure the assigned
logical I/O ranges unique.
But for indirect-IO devices, there is no cpu address. The current
pci_register_io_range() can not work for this case.

This patch makes some changes on the pci_register_io_range() to support the
I/O range registration with device's fwnode also. After this, the indirect-IO
devices can register the device-local I/O range to system logical I/O and
easily perform the translation between device-local I/O range and sytem
logical I/O range.

Signed-off-by: zhichang.yuan <yuanzhichang@xxxxxxxxxxxxx>
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@xxxxxxxxxx>
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

I had a couple trivial comments, but you can include my:

Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>	# drivers/pci parts

in your next revision.  I don't know who you have in mind to merge this;
it doesn't really touch much of PCI.  But let me know if you need anything
else from me.

Thanks Bjorn.

The current status is that we plan to send a new patchset early next week with the suggested change to combine PCI+extio IO framework. The IO space range stuff (pci_register_io_range() et al) will move from drivers/pci/pci.c to new lib/libio.c (renamed from extio.c).

We still need someone to merge (we are praying to make 4.11), and also Arnd to kindly check the update from his sketch and also more reviews of the ACPI part of what was extio.c (http://www.spinics.net/lists/devicetree/msg160611.html, 5/5)

Much appreciated,
John


---
 drivers/acpi/pci_root.c | 12 +++++-------
 drivers/of/address.c    |  8 ++------
 drivers/pci/pci.c       | 44 ++++++++++++++++++++++++++++++++++++++++----
 include/linux/pci.h     |  7 +++++--
 4 files changed, 52 insertions(+), 19 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux