[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220119092934.5285-1-vincent.whitchurch@axis.com>
Date: Wed, 19 Jan 2022 10:29:34 +0100
From: Vincent Whitchurch <vincent.whitchurch@...s.com>
To: Jeff Dike <jdike@...toit.com>, Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>
CC: <kernel@...s.com>, <devicetree@...r.kernel.org>,
Vincent Whitchurch <vincent.whitchurch@...s.com>,
Rob Herring <robh@...nel.org>, <linux-um@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] 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@...nel.org>
Link: https://lore.kernel.org/lkml/YeF%2FVbxo6fAt0WLp@robh.at.kernel.org/
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@...s.com>
---
arch/um/kernel/dtb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c
index ca69d72025f3..484141b06938 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)
--
2.34.1
Powered by blists - more mailing lists