Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[platform/kernel/linux-rpi.git] / arch / arm64 / mm / init.c
index 69d4251..75addb3 100644 (file)
@@ -295,6 +295,9 @@ void __init arm64_memblock_init(void)
        memstart_addr = round_down(memblock_start_of_DRAM(),
                                   ARM64_MEMSTART_ALIGN);
 
+       if ((memblock_end_of_DRAM() - memstart_addr) > linear_region_size)
+               pr_warn("Memory doesn't fit in the linear mapping, VA_BITS too small\n");
+
        /*
         * Remove the memory that we will not be able to cover with the
         * linear mapping. Take care not to clip the kernel which may be