Re: [RFC PATCH 06/13] switchtec_ntb: initialize hardware for memory windows

2017-06-17 Thread Greg Kroah-Hartman
On Sat, Jun 17, 2017 at 10:39:35AM -0600, Logan Gunthorpe wrote: > > > On 16/06/17 11:16 PM, Greg Kroah-Hartman wrote: > >> +#ifndef ioread64 > >> +#ifdef readq > >> +#define ioread64 readq > >> +#else > >> +#define ioread64 _ioread64 > >> +static inline u64 _ioread64(void __iomem *mmio) > >> +{

Re: [RFC PATCH 06/13] switchtec_ntb: initialize hardware for memory windows

2017-06-17 Thread Logan Gunthorpe
On 16/06/17 11:16 PM, Greg Kroah-Hartman wrote: >> +#ifndef ioread64 >> +#ifdef readq >> +#define ioread64 readq >> +#else >> +#define ioread64 _ioread64 >> +static inline u64 _ioread64(void __iomem *mmio) >> +{ >> +u64 low, high; >> + >> +low = ioread32(mmio); >> +high = ioread32(mmi

Re: [RFC PATCH 06/13] switchtec_ntb: initialize hardware for memory windows

2017-06-16 Thread Greg Kroah-Hartman
On Thu, Jun 15, 2017 at 02:37:22PM -0600, Logan Gunthorpe wrote: > This commit adds the code to initialize the memory windows in the > hardware. This includes setting up the requester ID table, and > figuring out which bar corresponds to which memory window. (Seeing > the switch can be configured w

[RFC PATCH 06/13] switchtec_ntb: initialize hardware for memory windows

2017-06-15 Thread Logan Gunthorpe
This commit adds the code to initialize the memory windows in the hardware. This includes setting up the requester ID table, and figuring out which bar corresponds to which memory window. (Seeing the switch can be configured with any number of bars.) Also, seeing the device doesn't have hardware f