WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [LINUX] dma: Use swiotlb mask for coherent mappings too

To: Jan Beulich <jbeulich@xxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [LINUX] dma: Use swiotlb mask for coherent mappings too
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Wed, 20 Dec 2006 11:55:10 +0000
Cc: Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>, Calvin Webster <cwebster@xxxxxxxxx>
Delivery-date: Wed, 20 Dec 2006 03:55:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4589319B.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcckLbMV8XeZQpAgEduE2gAX8io7RQ==
Thread-topic: [Xen-devel] [LINUX] dma: Use swiotlb mask for coherent mappings too
User-agent: Microsoft-Entourage/11.2.5.060620
We could fall back to swiotlb_alloc/free_coherent?

I took the patch but renamed io_tlb_dma_bits to dma_bits. This makes more
sense for users anyway I think -- they're unlikely to care whether
allocations go thru swiotlb or not, they just want to specify what device
limitation they require the kernel to handle by whatever means it chooses.
So now it's 'dma_bits=' rather than 'io_tlb_dma_bits=', which happens to
neatly be the same as the Xen boot parameter's name.

 -- Keir

On 20/12/06 11:50, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> As we're going to have a swiotlb_{alloc,free}_coherent implementation after
> the sync
> with lib/swiotlb.c anyway, wouldn't it make sense to have
> dma_{alloc,free}_coherent
> call the former rather than setting up things by itself? If course, this will
> increase
> pressure on the swiotlb memory, but otoh it could reduce the likelihood of the
> contiguous region setup failing (especially if those are of non-zero order).
> 
> Jan
> 
>>>> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 20.12.06 06:14 >>>
> Hi Keir:
> 
> [LINUX] dma: Use swiotlb mask for coherent mappings too
> 
> The recent change to use a default DMA bit width of 30 bits (required
> by chips like the b44) only converted the streaming DMA primitives.
> The coherent mappings are still hard-coded to 31 bits.  This means that
> b44 still doesn't work under Xen.
> 
> This patch makes the io_tlb_dma_bits variable global and uses it for
> coherent memory mappings.
> 
> Thanks to Calvin Webster for providing a machine with a b44 and 2G
> of memory I've been able to verify that this finally makes the b44
> work under Xen.
> 
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> 
> Cheers,


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel