aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-10-17 13:30:18 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-17 13:30:18 +1100
commitff412f03cd97a8c8e11fa2d0f1b5f1b44a46cb52 (patch)
tree29a2dd7b1d90e85be4de3ce71429e54ed3b86a8c /core
parent82b5bbd5824b3bfce75868f988011887b012b44f (diff)
downloadskiboot-ff412f03cd97a8c8e11fa2d0f1b5f1b44a46cb52.zip
skiboot-ff412f03cd97a8c8e11fa2d0f1b5f1b44a46cb52.tar.gz
skiboot-ff412f03cd97a8c8e11fa2d0f1b5f1b44a46cb52.tar.bz2
initramfs: only delete /chosen/initrd-* nodes if we load initramfs
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@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/init.c6
1 files 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",