Skip to contentSkip to conversation

um: Fix order of dtb unflatten/early init

PATCH New Vincent Whitchurch 1 participant 1 message Jan 19, 2022 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 um: Fix order of dtb unflatten/early init

Scan the tree for reserved memory before unflattening it. As Rob Herring said:

| These should be reversed. early_init_fdt_scan_reserved_mem() works on
| the flat tree. Reserved memory needs to be reserved before
| unflatten_device_tree() starts allocating memory. Though I imagine that
| doesn't really matter for UML.
---
 arch/um/kernel/dtb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/kernel/dtb.c +1 -1
index ca69d72025f3..484141b06938 100644
@@ -25,8 +25,8 @@ void uml_dtb_init(void)
 		return;
 	}
 
-	unflatten_device_tree();
 	early_init_fdt_scan_reserved_mem();
+	unflatten_device_tree();
 }
 
 static int __init uml_dtb_setup(char *line, int *add)
Signature · 1 line
2.34.1