Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-24 Thread Benjamin Herrenschmidt
On Mon, 2017-04-24 at 10:25 -0700, Sukadev Bhattiprolu wrote: > which maybe due to this :-) Should I change to pgprot_noncached() for > the MMIO writes? Just use normal ioremap(). > > requires being mapped cachable. Ask Aneesh for a cleaner way of > > doing it too while at it.

Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-24 Thread Benjamin Herrenschmidt
On Mon, 2017-04-24 at 10:25 -0700, Sukadev Bhattiprolu wrote: > which maybe due to this :-) Should I change to pgprot_noncached() for > the MMIO writes? Just use normal ioremap(). > > requires being mapped cachable. Ask Aneesh for a cleaner way of > > doing it too while at it.

Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-24 Thread Sukadev Bhattiprolu
Benjamin Herrenschmidt [b...@kernel.crashing.org] wrote: > On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > > +static void *map_mmio_region(char *name, uint64_t start, int len) > > +{ > > +   void *map; > > + > > +   if (!request_mem_region(start, len, name)) { > > + 

Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-24 Thread Sukadev Bhattiprolu
Benjamin Herrenschmidt [b...@kernel.crashing.org] wrote: > On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > > +static void *map_mmio_region(char *name, uint64_t start, int len) > > +{ > > +   void *map; > > + > > +   if (!request_mem_region(start, len, name)) { > > + 

Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-24 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > +static void *map_mmio_region(char *name, uint64_t start, int len) > +{ > +   void *map; > + > +   if (!request_mem_region(start, len, name)) { > +   pr_devel("%s(): request_mem_region(0x%llx, %d) failed\n", > +

Re: [PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-04-24 Thread Benjamin Herrenschmidt
On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > +static void *map_mmio_region(char *name, uint64_t start, int len) > +{ > +   void *map; > + > +   if (!request_mem_region(start, len, name)) { > +   pr_devel("%s(): request_mem_region(0x%llx, %d) failed\n", > +

[PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-03-30 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in a follow-on patches to read/write VAS hardware registers. These helpers are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu

[PATCH v4 05/11] VAS: Define helpers for access MMIO regions

2017-03-30 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in a follow-on patches to read/write VAS hardware registers. These helpers are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu --- Changelog [v3]: