arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys()
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Wed, 11 Sep 2019 18:25:43 +0000 (20:25 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 14 Oct 2019 09:56:28 +0000 (10:56 +0100)
By the time we call zones_sizes_init() arm64_dma_phys_limit already
contains the result of max_zone_dma_phys(). We use the variable instead
of calling the function directly to save some precious cpu time.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/init.c

index 45c00a54909c9b83bbf6b352a00ca1a02b5feff0..098c0f5bedf6c4220a2683605ea392d10b7b8522 100644 (file)
@@ -187,7 +187,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
        unsigned long max_zone_pfns[MAX_NR_ZONES]  = {0};
 
 #ifdef CONFIG_ZONE_DMA32
-       max_zone_pfns[ZONE_DMA32] = PFN_DOWN(max_zone_dma_phys());
+       max_zone_pfns[ZONE_DMA32] = PFN_DOWN(arm64_dma_phys_limit);
 #endif
        max_zone_pfns[ZONE_NORMAL] = max;