[PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-31 Thread Joerg Roedel
From: Joerg Roedel This function will be used from dma_direct code to determine the maximum segment size of a dma mapping. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 6 ++ kernel/dma/swiotlb.c| 9

[PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-30 Thread Joerg Roedel
From: Joerg Roedel This function will be used from dma_direct code to determine the maximum segment size of a dma mapping. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 6 ++ kernel/dma/swiotlb.c| 9

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-29 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 09:43:39AM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > This function will be used from dma_direct code to determine > the maximum segment size of a dma mapping. > > Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Joerg Roedel Looks good, Reviewed-by:

[PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-29 Thread Joerg Roedel
From: Joerg Roedel This function will be used from dma_direct code to determine the maximum segment size of a dma mapping. Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 6 ++ kernel/dma/swiotlb.c| 9 + 2 files changed, 15

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-28 Thread Michael S. Tsirkin
On Thu, Jan 24, 2019 at 04:00:00PM +0100, Joerg Roedel wrote: > On Thu, Jan 24, 2019 at 09:41:07AM +0100, Christoph Hellwig wrote: > > On Thu, Jan 24, 2019 at 09:29:23AM +0100, Joerg Roedel wrote: > > > > As I've just introduced and fixed a bug in this area in the current > > > > cycle - I don't

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-24 Thread Joerg Roedel
On Thu, Jan 24, 2019 at 09:41:07AM +0100, Christoph Hellwig wrote: > On Thu, Jan 24, 2019 at 09:29:23AM +0100, Joerg Roedel wrote: > > > As I've just introduced and fixed a bug in this area in the current > > > cycle - I don't think no_iotlb_memory is what your want (and maybe > > > not useful at

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-24 Thread Christoph Hellwig
On Thu, Jan 24, 2019 at 09:29:23AM +0100, Joerg Roedel wrote: > > As I've just introduced and fixed a bug in this area in the current > > cycle - I don't think no_iotlb_memory is what your want (and maybe > > not useful at all): if the arch valls swiotlb_exit after previously > > initializing a

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-24 Thread Joerg Roedel
On Wed, Jan 23, 2019 at 10:27:55PM +0100, Christoph Hellwig wrote: > On Wed, Jan 23, 2019 at 05:30:46PM +0100, Joerg Roedel wrote: > > +bool is_swiotlb_active(void) > > +{ > > + return !no_iotlb_memory; > > +} > > As I've just introduced and fixed a bug in this area in the current > cycle - I

Re: [PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-23 Thread Christoph Hellwig
On Wed, Jan 23, 2019 at 05:30:46PM +0100, Joerg Roedel wrote: > +bool is_swiotlb_active(void) > +{ > + return !no_iotlb_memory; > +} As I've just introduced and fixed a bug in this area in the current cycle - I don't think no_iotlb_memory is what your want (and maybe not useful at all): if

[PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-23 Thread Joerg Roedel
From: Joerg Roedel This function will be used from dma_direct code to determine the maximum segment size of a dma mapping. Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 6 ++ kernel/dma/swiotlb.c| 5 + 2 files changed, 11 insertions(+) diff --git