[lkml]   [2014]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v8 3/9] pci: Introduce pci_register_io_range() helper function.
On Wed, Jul 9, 2014 at 12:20 AM, Arnd Bergmann <> wrote:
> On Tuesday 08 July 2014, Bjorn Helgaas wrote:

>> I think my confusion is because your pci_register_io_range() and
>> pci_addess_to_pci() implementations assume that every io_range starts at
>> I/O port 0 on PCI (correct me if I'm wrong). I suspect that's why you
>> don't save the I/O port number in struct io_range.
> I think you are just misreading the code, but I agree it's hard to
> understand and I made the same mistake in my initial reply to the
> first version.
> pci_register_io_range and pci_address_to_pci only worry about the mapping
> between CPU physical and Linux I/O address, they do not care which PCI
> port numbers are behind that. The mapping between PCI port numbers and
> Linux port numbers is done correctly in patch 8/9 in the
> pci_host_bridge_of_get_ranges() function.

Ah, I see now. Thanks for explaining this again (I see you explained
it earlier; I just didn't understand it). Now that I see it, it *is*
very slick to handle both MMIO and PIO spaces the same way.


 \ /
  Last update: 2014-07-09 19:21    [W:0.123 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site