From: Vincent Whitchurch Date: Wed, 19 Jan 2022 09:29:34 +0000 (+0100) Subject: um: Fix order of dtb unflatten/early init X-Git-Tag: v6.1-rc5~1647^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39508aab4a66473b4ba7cce0dbe919f2fec7450a;p=platform%2Fkernel%2Flinux-starfive.git 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. Suggested-by: Rob Herring Link: https://lore.kernel.org/lkml/YeF%2FVbxo6fAt0WLp@robh.at.kernel.org/ Signed-off-by: Vincent Whitchurch Signed-off-by: Richard Weinberger --- diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c index ca69d72..484141b 100644 --- a/arch/um/kernel/dtb.c +++ b/arch/um/kernel/dtb.c @@ -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)