um: Fix order of dtb unflatten/early init
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Wed, 19 Jan 2022 09:29:34 +0000 (10:29 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 11 Mar 2022 09:44:43 +0000 (10:44 +0100)
commit39508aab4a66473b4ba7cce0dbe919f2fec7450a
treeced3f2bf78c9d4c204188137ab372bfe23e20a0a
parente3a33af812c611d99756e2ec61e9d7068d466bdf
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 <robh@kernel.org>
Link: https://lore.kernel.org/lkml/YeF%2FVbxo6fAt0WLp@robh.at.kernel.org/
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/dtb.c