aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-10-03 09:35:18 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2012-10-08 11:02:09 -0400
commit27222a3d2bbb40f80af6abf0cefea1b27125409e (patch)
treec5d136c0615ac1e5785526c3f5bbc90ddb63247c /arch/arm64
parente9eca4de957ac33744fb994ccacd4a5102e445a8 (diff)
arm64: Call swiotlb_init() instead of swiotlb_init_with_default_size()
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/mm/dma-mapping.c6
-rw-r--r--arch/arm64/mm/init.c5
-rw-r--r--arch/arm64/mm/mm.h1
3 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 5eb244453a5b..4bd7579ec9e6 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -61,12 +61,10 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = {
61 .mapping_error = swiotlb_dma_mapping_error, 61 .mapping_error = swiotlb_dma_mapping_error,
62}; 62};
63 63
64void __init swiotlb_init_with_default_size(size_t default_size, int verbose); 64void __init arm64_swiotlb_init(void)
65
66void __init arm64_swiotlb_init(size_t max_size)
67{ 65{
68 dma_ops = &arm64_swiotlb_dma_ops; 66 dma_ops = &arm64_swiotlb_dma_ops;
69 swiotlb_init_with_default_size(min((size_t)SZ_64M, max_size), 1); 67 swiotlb_init(1);
70} 68}
71 69
72#define PREALLOC_DMA_DEBUG_ENTRIES 4096 70#define PREALLOC_DMA_DEBUG_ENTRIES 4096
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 5f719ba949bc..efbf7df05d3f 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -301,10 +301,7 @@ void __init mem_init(void)
301 unsigned long reserved_pages, free_pages; 301 unsigned long reserved_pages, free_pages;
302 struct memblock_region *reg; 302 struct memblock_region *reg;
303 303
304#if CONFIG_SWIOTLB 304 arm64_swiotlb_init();
305 extern void __init arm64_swiotlb_init(size_t max_size);
306 arm64_swiotlb_init(max_pfn << (PAGE_SHIFT - 1));
307#endif
308 305
309 max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; 306 max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
310 307
diff --git a/arch/arm64/mm/mm.h b/arch/arm64/mm/mm.h
index d8d6e7851c14..916701e6d040 100644
--- a/arch/arm64/mm/mm.h
+++ b/arch/arm64/mm/mm.h
@@ -1,2 +1,3 @@
1extern void __flush_dcache_page(struct page *page); 1extern void __flush_dcache_page(struct page *page);
2extern void __init bootmem_init(void); 2extern void __init bootmem_init(void);
3extern void __init arm64_swiotlb_init(void);