c697494f8aee041f3dc393c4b2cdf9183d0e9a48
[openwrt/staging/981213.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 @@ -181,7 +181,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