]> Pileus Git - ~andy/linux/commitdiff
arm64: Call swiotlb_init() instead of swiotlb_init_with_default_size()
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 3 Oct 2012 13:35:18 +0000 (14:35 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 8 Oct 2012 15:02:09 +0000 (16:02 +0100)
Following commit 74838b7 (swiotlb: add the late swiotlb initialization
function with iotlb memory) the swiotlb_init_with_default_size() is a
static function. This patch changes the arm64 code to call
swiotlb_init() instead and use the default size of 64MB. It is assumed
that AArch64 platforms have enough RAM to afford the pre-allocated
swiotlb memory. It also removes the #ifdef around this call since
CONFIG_SWIOTLB is always enabled.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/dma-mapping.c
arch/arm64/mm/init.c
arch/arm64/mm/mm.h

index 5eb244453a5b3d0dce87c6b298313a0b50c8ca49..4bd7579ec9e6029746cb0fc485a255056fbaf2ff 100644 (file)
@@ -61,12 +61,10 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = {
        .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)
+void __init arm64_swiotlb_init(void)
 {
        dma_ops = &arm64_swiotlb_dma_ops;
-       swiotlb_init_with_default_size(min((size_t)SZ_64M, max_size), 1);
+       swiotlb_init(1);
 }
 
 #define PREALLOC_DMA_DEBUG_ENTRIES     4096
index 5f719ba949bc53ea054872a367e9169de5c6c8ab..efbf7df05d3f6e2ffe4b6105b8cdb0e49a97ab1b 100644 (file)
@@ -301,10 +301,7 @@ void __init mem_init(void)
        unsigned long reserved_pages, free_pages;
        struct memblock_region *reg;
 
-#if CONFIG_SWIOTLB
-       extern void __init arm64_swiotlb_init(size_t max_size);
-       arm64_swiotlb_init(max_pfn << (PAGE_SHIFT - 1));
-#endif
+       arm64_swiotlb_init();
 
        max_mapnr   = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
 
index d8d6e7851c149eee4fd416829b3b99c33a6605e5..916701e6d040b92b5edbf63935ff2ecd8f3e101a 100644 (file)
@@ -1,2 +1,3 @@
 extern void __flush_dcache_page(struct page *page);
 extern void __init bootmem_init(void);
+extern void __init arm64_swiotlb_init(void);