Re: [PATCH v4 2/3] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-06-13 Thread Bjorn Helgaas
On Tue, Jun 11, 2019 at 10:12:53PM +0800, John Garry wrote: > Currently when accessing logical indirect PIO addresses in > logic_{in, out}{,s}, we first ensure that the region is registered. I think logic_pio is specifically concerned with I/O port space, so it's a little bit unfortunate that we n

Re: [PATCH v4 2/3] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-06-13 Thread Arnd Bergmann
On Thu, Jun 13, 2019 at 5:20 AM Bjorn Helgaas wrote: > > On Tue, Jun 11, 2019 at 10:12:53PM +0800, John Garry wrote: > > Currently when accessing logical indirect PIO addresses in > > logic_{in, out}{,s}, we first ensure that the region is registered. > > I think logic_pio is specifically concerne

Re: [PATCH v4 2/3] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-06-13 Thread John Garry
On 13/06/2019 04:20, Bjorn Helgaas wrote: On Tue, Jun 11, 2019 at 10:12:53PM +0800, John Garry wrote: Currently when accessing logical indirect PIO addresses in logic_{in, out}{,s}, we first ensure that the region is registered. Hi Bjorn, I think logic_pio is specifically concerned with I/

Re: [PATCH v4 2/3] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-06-13 Thread Bjorn Helgaas
On Thu, Jun 13, 2019 at 11:17:37AM +0100, John Garry wrote: > On 13/06/2019 04:20, Bjorn Helgaas wrote: > > On Tue, Jun 11, 2019 at 10:12:53PM +0800, John Garry wrote: > > > Currently when accessing logical indirect PIO addresses in > > > logic_{in, out}{,s}, we first ensure that the region is regi

Re: [PATCH v4 2/3] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-06-13 Thread John Garry
Hi Bjorn, There were many different names along the way to this support merged, and I think that the naming became almost irrelevant in the end. Yep, Arnd is right. The "PIO" name contributed a little to my confusion, but I think the bigger piece was that I read the "indirect PIO addresses"

[PATCH v4 2/3] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-06-11 Thread John Garry
Currently when accessing logical indirect PIO addresses in logic_{in, out}{,s}, we first ensure that the region is registered. However, no such check exists for CPU MMIO regions. The CPU MMIO regions would be registered by the PCI host (when PCI_IOBASE is defined) in pci_register_io_range(). We h