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

2019-04-08 Thread John Garry
On 05/04/2019 19:06, Bjorn Helgaas wrote: On Fri, Apr 05, 2019 at 09:10:27AM +0100, John Garry wrote: On 04/04/2019 19:58, Bjorn Helgaas wrote: On Thu, Apr 04, 2019 at 10:43:36AM -0700, Guenter Roeck wrote: On Thu, Apr 04, 2019 at 05:52:35PM +0100, John Garry wrote: Note that the f71805f

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

2019-04-05 Thread Guenter Roeck
On Fri, Apr 05, 2019 at 01:06:15PM -0500, Bjorn Helgaas wrote: > On Fri, Apr 05, 2019 at 09:10:27AM +0100, John Garry wrote: > > On 04/04/2019 19:58, Bjorn Helgaas wrote: > > > On Thu, Apr 04, 2019 at 10:43:36AM -0700, Guenter Roeck wrote: > > > > On Thu, Apr 04, 2019 at 05:52:35PM +0100, John

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

2019-04-05 Thread Bjorn Helgaas
On Fri, Apr 05, 2019 at 09:10:27AM +0100, John Garry wrote: > On 04/04/2019 19:58, Bjorn Helgaas wrote: > > On Thu, Apr 04, 2019 at 10:43:36AM -0700, Guenter Roeck wrote: > > > On Thu, Apr 04, 2019 at 05:52:35PM +0100, John Garry wrote: > > > > > > Note that the f71805f driver does not call > > >

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

2019-04-05 Thread John Garry
On 04/04/2019 19:58, Bjorn Helgaas wrote: On Thu, Apr 04, 2019 at 10:43:36AM -0700, Guenter Roeck wrote: On Thu, Apr 04, 2019 at 05:52:35PM +0100, John Garry wrote: Note that the f71805f driver does not call request_{muxed_}region(), as it should. ... which is the real problem, one that is

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

2019-04-04 Thread Bjorn Helgaas
On Thu, Apr 04, 2019 at 10:43:36AM -0700, Guenter Roeck wrote: > On Thu, Apr 04, 2019 at 05:52:35PM +0100, John Garry wrote: > > >>Note that the f71805f driver does not call > > >>request_{muxed_}region(), as it should. > > > > >... which is the real problem, one that is not solved by this > >

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

2019-04-04 Thread Guenter Roeck
On Thu, Apr 04, 2019 at 05:52:35PM +0100, John Garry wrote: [ ... ] > >> > >>Note that the f71805f driver does not call request_{muxed_}region(), as it > >>should. > >> > > Hi Guenter, > > >... which is the real problem, one that is not solved by this patch. This may > >result in parallel and

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

2019-04-04 Thread John Garry
On 04/04/2019 17:41, Guenter Roeck wrote: On Fri, Apr 05, 2019 at 12:00:01AM +0800, John Garry wrote: 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

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

2019-04-04 Thread Guenter Roeck
On Fri, Apr 05, 2019 at 12:00:01AM +0800, John Garry wrote: > 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

[PATCH v3 3/4] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions

2019-04-04 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().