Re: [Xen-devel] [PATCH 2/2] swiotlb-xen: xen_swiotlb_map_page: do not error out if dma_capable fails

2013-11-13 Thread Stefano Stabellini
On Tue, 12 Nov 2013, Rob Herring wrote: > On 11/12/2013 11:27 AM, Stefano Stabellini wrote: > > Russell gave a great explanation of the issue so I am just going to > > limit myself to answering to: > > > > On Tue, 12 Nov 2013, Konrad Rzeszutek Wilk wrote: > >>> Considering that we know that the sw

Re: [Xen-devel] [PATCH 2/2] swiotlb-xen: xen_swiotlb_map_page: do not error out if dma_capable fails

2013-11-12 Thread Rob Herring
On 11/12/2013 11:27 AM, Stefano Stabellini wrote: > Russell gave a great explanation of the issue so I am just going to > limit myself to answering to: > > On Tue, 12 Nov 2013, Konrad Rzeszutek Wilk wrote: >>> Considering that we know that the swiotlb buffer has a low address, >>> skip the check.

Re: [Xen-devel] [PATCH 2/2] swiotlb-xen: xen_swiotlb_map_page: do not error out if dma_capable fails

2013-11-12 Thread Stefano Stabellini
Russell gave a great explanation of the issue so I am just going to limit myself to answering to: On Tue, 12 Nov 2013, Konrad Rzeszutek Wilk wrote: > > Considering that we know that the swiotlb buffer has a low address, > > skip the check. > > I am not following that sentence. Could you please ex

Re: [Xen-devel] [PATCH 2/2] swiotlb-xen: xen_swiotlb_map_page: do not error out if dma_capable fails

2013-11-12 Thread Russell King - ARM Linux
On Tue, Nov 12, 2013 at 09:48:32AM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Nov 12, 2013 at 02:12:00PM +, Stefano Stabellini wrote: > > Many ARM devices do not set the dma_mask correctly today. > > As a consequence dma_capable fails for them regardless of the address > > passed to it. > >

Re: [Xen-devel] [PATCH 2/2] swiotlb-xen: xen_swiotlb_map_page: do not error out if dma_capable fails

2013-11-12 Thread Konrad Rzeszutek Wilk
On Tue, Nov 12, 2013 at 02:12:00PM +, Stefano Stabellini wrote: > Many ARM devices do not set the dma_mask correctly today. > As a consequence dma_capable fails for them regardless of the address > passed to it. Wouldn't the DMA API debug warn of bad usage. > In xen_swiotlb_map_page we curren

[PATCH 2/2] swiotlb-xen: xen_swiotlb_map_page: do not error out if dma_capable fails

2013-11-12 Thread Stefano Stabellini
Many ARM devices do not set the dma_mask correctly today. As a consequence dma_capable fails for them regardless of the address passed to it. In xen_swiotlb_map_page we currently use dma_capable to check if the address returned by the swiotlb is good for dma for the device. However the check would