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

Cédric Le Goater clg at kaod.org
Mon Apr 8 17:32:32 AEST 2019


On 4/8/19 5:17 AM, Andrew Jeffery wrote:
> 
> 
> 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)?

yes. I only reverted  95f7b3b9698b but we can improve the code.

Thanks,

C. 


More information about the Skiboot mailing list