[Skiboot] [PATCH 12/14] hw/slw: use dt_new_check()

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Jan 13 19:42:18 AEDT 2017


On 01/12/2017 09:24 AM, Oliver O'Halloran wrote:
> On P9 systems the /ibm,opal/power-mgt/ node may be created by the HDAT
> parser before reaching add_cpu_idle_state_properties(). This is fine,
> but it needs to be handled.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

Its better to move this patch before adding stop level (previous patch). Else we 
may endup hitting duplicate node issue during git-bisect.

Otherwise patch itself  looks good.

Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>

-Vasant

> ---
>   hw/slw.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/slw.c b/hw/slw.c
> index 853ff6b6aefa..78a3e37f867a 100644
> --- a/hw/slw.c
> +++ b/hw/slw.c
> @@ -648,11 +648,10 @@ void add_cpu_idle_state_properties(void)
>   	u32 *residency_ns_buf;
>   	u32 *flags_buf;
>
> -
>   	prlog(PR_DEBUG, "CPU idle state device tree init\n");
>
> -	/* Create /ibm,opal/power-mgt */
> -	power_mgt = dt_new(opal_node, "power-mgt");
> +	/* Create /ibm,opal/power-mgt if it doesn't exist already */
> +	power_mgt = dt_new_check(opal_node, "power-mgt");
>   	if (!power_mgt) {
>   		/**
>   		 * @fwts-label CreateDTPowerMgtNodeFail
>



More information about the Skiboot mailing list