summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2020-11-19 18:53:54 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2020-11-20 09:34:13 +0000
commit9804f8c69b04a39d0ba41d19e6bdc6aa91c19725 (patch)
tree19f7827af52edf06b827ab7447b9c10cb5ed1bad
parent0a30c53573b07d5561457e41fb0ab046cd857da5 (diff)
downloadlinux-9804f8c69b04a39d0ba41d19e6bdc6aa91c19725.tar.gz
linux-9804f8c69b04a39d0ba41d19e6bdc6aa91c19725.tar.bz2
linux-9804f8c69b04a39d0ba41d19e6bdc6aa91c19725.zip
arm64: mm: Move zone_dma_bits initialization into zone_sizes_init()
zone_dma_bits's initialization happens earlier that it's actually needed, in arm64_memblock_init(). So move it into the more suitable zone_sizes_init(). Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Jeremy Linton <jeremy.linton@arm.com> Link: https://lore.kernel.org/r/20201119175400.9995-3-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm64/mm/init.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 5cae22be54fa..1609b61ef268 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -197,6 +197,8 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
unsigned long max_zone_pfns[MAX_NR_ZONES] = {0};
#ifdef CONFIG_ZONE_DMA
+ zone_dma_bits = ARM64_ZONE_DMA_BITS;
+ arm64_dma_phys_limit = max_zone_phys(zone_dma_bits);
max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit);
#endif
#ifdef CONFIG_ZONE_DMA32
@@ -383,11 +385,6 @@ void __init arm64_memblock_init(void)
early_init_fdt_scan_reserved_mem();
- if (IS_ENABLED(CONFIG_ZONE_DMA)) {
- zone_dma_bits = ARM64_ZONE_DMA_BITS;
- arm64_dma_phys_limit = max_zone_phys(ARM64_ZONE_DMA_BITS);
- }
-
if (IS_ENABLED(CONFIG_ZONE_DMA32))
arm64_dma32_phys_limit = max_zone_phys(32);
else