[Skiboot] [PATCH] initramfs: only delete /chosen/initrd-* nodes if we load initramfs
Stewart Smith
stewart at linux.vnet.ibm.com
Mon Oct 17 13:32:02 AEDT 2016
This works around a problem introduced with fast-reset where if
we provided initrd through qemu (powernv) command line, we'd delete
the device tree nodes before being able to use them.
Fixes: 0279d8951ead549fdebce93130a2f6c673081862
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
core/init.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/init.c b/core/init.c
index 871c2a2..43ce3a0 100644
--- a/core/init.c
+++ b/core/init.c
@@ -434,15 +434,15 @@ static void load_initramfs(void)
{
int loaded;
- dt_check_del_prop(dt_chosen, "linux,initrd-start");
- dt_check_del_prop(dt_chosen, "linux,initrd-end");
-
loaded = wait_for_resource_loaded(RESOURCE_ID_INITRAMFS,
RESOURCE_SUBID_NONE);
if (loaded != OPAL_SUCCESS || !initramfs_size)
return;
+ dt_check_del_prop(dt_chosen, "linux,initrd-start");
+ dt_check_del_prop(dt_chosen, "linux,initrd-end");
+
printf("INIT: Initramfs loaded, size: %zu bytes\n", initramfs_size);
dt_add_property_u64(dt_chosen, "linux,initrd-start",
--
2.7.4
More information about the Skiboot
mailing list