lkml.org 
[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 14/31] arm64: DMA mapping API
Date
On Tuesday 14 August 2012, Catalin Marinas wrote:
> +static struct dma_map_ops arm64_swiotlb_dma_ops = {
> + .alloc = arm64_swiotlb_alloc_coherent,
> + .free = arm64_swiotlb_free_coherent,
> + .map_page = arm64_swiotlb_map_page,
> + .unmap_page = arm64_swiotlb_unmap_page,
> + .map_sg = arm64_swiotlb_map_sg_attrs,
> + .unmap_sg = arm64_swiotlb_unmap_sg_attrs,
> + .sync_single_for_cpu = arm64_swiotlb_sync_single_for_cpu,
> + .sync_single_for_device = arm64_swiotlb_sync_single_for_device,
> + .sync_sg_for_cpu = arm64_swiotlb_sync_sg_for_cpu,
> + .sync_sg_for_device = arm64_swiotlb_sync_sg_for_device,
> + .dma_supported = swiotlb_dma_supported,
> + .mapping_error = swiotlb_dma_mapping_error,
> +};
> +
> +void __init swiotlb_init_with_default_size(size_t default_size, int verbose);
> +
> +void __init arm64_swiotlb_init(size_t max_size)
> +{
> + dma_ops = &arm64_swiotlb_dma_ops;
> + swiotlb_init_with_default_size(min((size_t)SZ_64M, max_size), 1);
> +}

Why is swiotlb the default? I would expect that most devices can in fact
use the entire 64 bit address space, so you can use a simple linear
implementation for those.

Arnd


\
 
 \ /
  Last update: 2012-08-15 19:02    [W:0.669 / U:3.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site