From: Wei Yang <wei.y...@windriver.com>

When the MEMORY_START is larger than 0 we need to ensure that kernel
does not reserve the range from 0 to MEMORY_START in memblock. Because
the range is out of the available memory.

Signed-off-by: Wei Yang <wei.y...@windriver.com>
---
 arch/powerpc/kernel/prom.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index f191bf0..d2054f3 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -678,6 +678,12 @@ void __init early_init_devtree(void *params)
 #endif
                reserve_crashkernel();
        early_reserve_mem();
+       /*
+        * The range of reserved memory region is out of memory
+        * while MEMORY_START is larger than 0.
+        * so we should remove it.
+        */
+       memblock_free(0, MEMORY_START);
 
        /*
         * Ensure that total memory size is page-aligned, because otherwise
-- 
1.8.3

_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to