Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1573669

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

From John Garry <john.garry@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH V6 2/5] PCI: Adapt pci_register_io_range() for indirect-IO and PCI I/O translation
Date 2017-02-04 14:10 +0100
Message-ID <t78gh-RG-5@gated-at.bofh.it> (permalink)
References <t32VP-Mf-7@gated-at.bofh.it> <t32VP-Mf-5@gated-at.bofh.it> <t5uuB-2f0-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@hisilicon.com>
>> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> I had a couple trivial comments, but you can include my:
>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# 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(-)
>>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V6 2/5] PCI: Adapt pci_register_io_range() for  indirect-IO and  PCI I/O translation Bjorn Helgaas <helgaas@kernel.org> - 2017-01-31 01:30 +0100
  Re: [PATCH V6 2/5] PCI: Adapt pci_register_io_range() for indirect-IO  and PCI I/O translation John Garry <john.garry@huawei.com> - 2017-02-04 14:10 +0100

csiph-web