]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64: mm: fix booting on systems with no memory below 4GB
authorWill Deacon <will.deacon@arm.com>
Thu, 8 Nov 2012 16:00:16 +0000 (16:00 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 8 Nov 2012 16:06:21 +0000 (16:06 +0000)
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: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/processor.h
arch/arm64/mm/init.c

index 5d810044fedabf7fb897ffc603c3f8a3aae271db..77f696c143396d9bf93521d6444bf12dd4b82c01 100644 (file)
@@ -43,6 +43,8 @@
 #else
 #define STACK_TOP              STACK_TOP_MAX
 #endif /* CONFIG_COMPAT */
+
+#define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK
 #endif /* __KERNEL__ */
 
 struct debug_info {
index efbf7df05d3f6e2ffe4b6105b8cdb0e49a97ab1b..4cd28931dba95da0711a4aeabed694613febce5f 100644 (file)
@@ -80,7 +80,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
 #ifdef CONFIG_ZONE_DMA32
        /* 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;
 #endif
        zone_size[ZONE_NORMAL] = max - max_dma32;