Commit f483a853 authored by Will Deacon's avatar Will Deacon Committed by Catalin Marinas

arm64: mm: fix booting on systems with no memory below 4GB

Booting on a system with all of its memory above the 4GB boundary breaks
for two reasons:

	(1) We still try to create a non-empty DMA32 zone
	(2) no-bootmem limits allocations to 0xffffffff

This patch fixes these issues for ARM64.
Tested-by: default avatarMarc Zyngier <>
Signed-off-by: default avatarWill Deacon <>
Signed-off-by: default avatarCatalin Marinas <>
parent b3770b32
......@@ -43,6 +43,8 @@
#endif /* CONFIG_COMPAT */
#endif /* __KERNEL__ */
struct debug_info {
......@@ -80,7 +80,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
/* 4GB maximum for 32-bit only capable devices */
max_dma32 = min(max, MAX_DMA32_PFN);
zone_size[ZONE_DMA32] = max_dma32 - min;
zone_size[ZONE_DMA32] = max(min, max_dma32) - min;
zone_size[ZONE_NORMAL] = max - max_dma32;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment