[Skiboot] [PATCH 6/9] npu2: Adjust content of the GENID BAR

Reza Arbab arbab at linux.vnet.ibm.com
Tue Jul 18 07:22:30 AEST 2017


On Mon, Jul 17, 2017 at 01:45:41PM +1000, Alistair Popple wrote:
>On Fri, 14 Jul 2017 10:39:25 AM Reza Arbab wrote: 
>> @@ -201,7 +201,11 @@ static void npu2_read_bar(struct npu2 *p, struct npu2_bar *bar)
>>  		bar->size = 0x20000;
>>  		break;
>>  	case NPU2_GENID_BAR:
>> -		bar->base = GETFIELD(NPU2_GENID_BAR_ADDR, val) << 17;
>> +		if (is_p9dd1())
>
>Do we really need this? Didn't DD2 just add an extra bit at the start of the
>field that we don't touch on NVLink?
>
>Ie. You are not actually changing the value of the register so I think you could
>just do this:
>
>> +			bar->base = GETFIELD(NPU2_GENID_BAR_ADDR, val) << 16;
>
>On both DD1 and DD2.
>
>> +			bar->base = GETFIELD(NPU2_DD1_GENID_BAR_ADDR, val) << 17;
>> +		else
>> +			bar->base = GETFIELD(NPU2_GENID_BAR_ADDR, val) << 16;
>> +
>>  		enabled = GETFIELD(NPU2_GENID_BAR_ENABLE, val);
>>  		bar->size = 0x20000;
>>  		break;

Doh. Yes, I see what you're saying.

-- 
Reza Arbab



More information about the Skiboot mailing list