The code should check for the size of the phys_initrd_size rather than
phys_devtree_size before calling memblock_reserve().If initrd is not passed
from the Device Tree  the parameters phys_initrd_start, and phys_initrd_size are
zeros.The kernel complaints with a BUG if the arguments passed to 
memblock_reserve
are zeroes.

Signed-off-by: Shaju Abraham <[email protected]>
---
This patch applies to Grant Likely's tree test-devtree branch

 arch/arm/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 9ddace8..018b76e 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -310,7 +310,7 @@ void __init arm_memblock_init(struct meminfo *mi, struct 
machine_desc *mdesc)
        }
 #endif
 #ifdef CONFIG_OF_FLATTREE
-       if (phys_devtree_size)
+       if (phys_initrd_size)
                memblock_reserve(phys_initrd_start, phys_initrd_size);
 #endif
 
-- 
1.7.2

_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to