[PATCH 5/8] of: fdt: register physmem in early_init_dt_scan_memory()

Ard Biesheuvel ard.biesheuvel at linaro.org
Mon Dec 22 11:08:39 PST 2014


This patch changes early_init_dt_scan_memory() so that all memory
covered by DT memory nodes is registered in the 'physmem' memblock
table if CONFIG_HAVE_MEMBLOCK_PHYS_MAP is enabled.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
---
 drivers/of/fdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 510074226d57..6e59c2168536 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -894,6 +894,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
 		    (unsigned long long)size);
 
 		early_init_dt_add_memory_arch(base, size);
+		memblock_add_phys(base, size);
 	}
 
 	return 0;
-- 
1.8.3.2




More information about the linux-arm-kernel mailing list