a90e7f8587c5ab5eee5a0e910ee2f3b07a2cc8d6
[openwrt/staging/jow.git] /
1 From c17f622cbb33332a305ef383506740d3d01aa831 Mon Sep 17 00:00:00 2001
2 From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
3 Date: Wed, 11 Sep 2019 20:25:43 +0200
4 Subject: [PATCH] arm64: mm: use arm64_dma_phys_limit instead of
5 calling max_zone_dma_phys()
6
7 commit ae970dc096b2d39f65f2e18d142e3978dc9ee1c7 upstream.
8
9 By the time we call zones_sizes_init() arm64_dma_phys_limit already
10 contains the result of max_zone_dma_phys(). We use the variable instead
11 of calling the function directly to save some precious cpu time.
12
13 Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
14 Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
15 Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
16 ---
17 arch/arm64/mm/init.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 --- a/arch/arm64/mm/init.c
21 +++ b/arch/arm64/mm/init.c
22 @@ -187,7 +187,7 @@ static void __init zone_sizes_init(unsig
23 unsigned long max_zone_pfns[MAX_NR_ZONES] = {0};
24
25 #ifdef CONFIG_ZONE_DMA32
26 - max_zone_pfns[ZONE_DMA32] = PFN_DOWN(max_zone_dma_phys());
27 + max_zone_pfns[ZONE_DMA32] = PFN_DOWN(arm64_dma_phys_limit);
28 #endif
29 max_zone_pfns[ZONE_NORMAL] = max;
30