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

Michael Neuling mikey at neuling.org
Thu Feb 9 17:52:07 AEDT 2017


On Wed, 2017-02-08 at 12:16 +1100, Oliver O'Halloran wrote:
> 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>

Thanks

Acked-by: Michael Neuling <mikey at neuling.org>

> ---
>  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);
>  


More information about the Skiboot mailing list