[Skiboot] [PATCH 3/3] nx: remove check on the "qemu, powernv" property

Andrew Jeffery andrew at aj.id.au
Mon Apr 8 13:17:08 AEST 2019



On Fri, 5 Apr 2019, at 00:49, Cédric Le Goater wrote:
> commit 95f7b3b9698b ("nx: Don't abort on missing NX when using a QEMU
> machine") introduced a check on the property "qemu,powernv" to skip NX
> initialization when running under a QEMU machine.
> 
> The QEMU platforms now expose a QUIRK_NO_RNG in the chip. Testing the
> "qemu,powernv" property is not necessary anymore.
> 
> Signed-off-by: Cédric Le Goater <clg at kaod.org>
> ---
>  hw/nx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/nx.c b/hw/nx.c
> index d3746aeaa852..1fedee77f38d 100644
> --- a/hw/nx.c
> +++ b/hw/nx.c
> @@ -45,8 +45,7 @@ static void p9_darn_init(void)
>  	dt_for_each_compatible(dt_root, nx, "ibm,power9-nx")
>  		break;
>  	if (!nx) {
> -		if (!dt_node_is_compatible(dt_root, "qemu,powernv"))
> -			assert(nx);
> +		assert(nx);

if (!false)
  assert(false);

That seems bogus? Just replace the if() block entirely with assert(nx)?

I'm not familiar with the NX story though.

Andrew

>  		return;
>  	}
>  
> -- 
> 2.20.1
> 
>


More information about the Skiboot mailing list