[Skiboot] [PATCH] core/opal: check ibm,opal exists

Oliver O'Halloran oohall at gmail.com
Wed Feb 8 12:16:13 AEDT 2017


The ibm,opal node is normally created by Skiboot either in the HDAT parser
or after the input FDT has been unflattened. However, in order to supply
the /ibm,opal/power-mgt/enabled-stop-states property FDT we to tolerate
/ibm,opal/ existing in the input tree.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 core/opal.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/core/opal.c b/core/opal.c
index 6087e65a5fad..88ca2af498ee 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -149,11 +149,7 @@ void add_opal_node(void)
 	size = (CPU_STACKS_BASE +
 		(uint64_t)(cpu_max_pir + 1) * STACK_SIZE) - SKIBOOT_BASE;
 
-	if (!opal_node) {
-		opal_node = dt_new(dt_root, "ibm,opal");
-		assert(opal_node);
-	}
-
+	opal_node = dt_new_check(dt_root, "ibm,opal");
 	dt_add_property_cells(opal_node, "#address-cells", 0);
 	dt_add_property_cells(opal_node, "#size-cells", 0);
 
-- 
2.9.3



More information about the Skiboot mailing list