Re: [PATCH v2 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2018-01-18 Thread Jon Mason
On Mon, Dec 18, 2017 at 11:25:06AM -0700, Logan Gunthorpe wrote: > With Switchtec hardware, the buffer used for a memory window must be > aligned to its size (the hardware only replaces the lower bits). In > certain circumstances dma_alloc_coherent() will not provide a buffer > that adheres to

Re: [PATCH v2 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2018-01-18 Thread Jon Mason
On Mon, Dec 18, 2017 at 11:25:06AM -0700, Logan Gunthorpe wrote: > With Switchtec hardware, the buffer used for a memory window must be > aligned to its size (the hardware only replaces the lower bits). In > certain circumstances dma_alloc_coherent() will not provide a buffer > that adheres to

[PATCH v2 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2017-12-18 Thread Logan Gunthorpe
With Switchtec hardware, the buffer used for a memory window must be aligned to its size (the hardware only replaces the lower bits). In certain circumstances dma_alloc_coherent() will not provide a buffer that adheres to this requirement like when using the CMA and CONFIG_CMA_ALIGNMENT is set

[PATCH v2 2/2] ntb_hw_switchtec: Check for alignment of the buffer in mw_set_trans()

2017-12-18 Thread Logan Gunthorpe
With Switchtec hardware, the buffer used for a memory window must be aligned to its size (the hardware only replaces the lower bits). In certain circumstances dma_alloc_coherent() will not provide a buffer that adheres to this requirement like when using the CMA and CONFIG_CMA_ALIGNMENT is set