diff options
Diffstat (limited to 'arch/arm64/mm/dma-mapping.c')
-rw-r--r-- | arch/arm64/mm/dma-mapping.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 0a24b9b8c698..58e0c2bdde04 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c | |||
@@ -348,8 +348,6 @@ static struct dma_map_ops swiotlb_dma_ops = { | |||
348 | .mapping_error = swiotlb_dma_mapping_error, | 348 | .mapping_error = swiotlb_dma_mapping_error, |
349 | }; | 349 | }; |
350 | 350 | ||
351 | extern int swiotlb_late_init_with_default_size(size_t default_size); | ||
352 | |||
353 | static int __init atomic_pool_init(void) | 351 | static int __init atomic_pool_init(void) |
354 | { | 352 | { |
355 | pgprot_t prot = __pgprot(PROT_NORMAL_NC); | 353 | pgprot_t prot = __pgprot(PROT_NORMAL_NC); |
@@ -411,21 +409,13 @@ out: | |||
411 | return -ENOMEM; | 409 | return -ENOMEM; |
412 | } | 410 | } |
413 | 411 | ||
414 | static int __init swiotlb_late_init(void) | 412 | static int __init arm64_dma_init(void) |
415 | { | 413 | { |
416 | size_t swiotlb_size = min(SZ_64M, MAX_ORDER_NR_PAGES << PAGE_SHIFT); | 414 | int ret; |
417 | 415 | ||
418 | dma_ops = &swiotlb_dma_ops; | 416 | dma_ops = &swiotlb_dma_ops; |
419 | 417 | ||
420 | return swiotlb_late_init_with_default_size(swiotlb_size); | 418 | ret = atomic_pool_init(); |
421 | } | ||
422 | |||
423 | static int __init arm64_dma_init(void) | ||
424 | { | ||
425 | int ret = 0; | ||
426 | |||
427 | ret |= swiotlb_late_init(); | ||
428 | ret |= atomic_pool_init(); | ||
429 | 419 | ||
430 | return ret; | 420 | return ret; |
431 | } | 421 | } |