[Skiboot] [PATCH RFC 2/2] phb4: Use ASB for read/writes to PHB registers on resets

Guilherme G. Piccoli gpiccoli at linux.vnet.ibm.com
Tue Oct 3 13:28:01 AEDT 2017


On 10/02/2017 09:38 PM, Michael Neuling wrote:
> [...] 
> I'm not sure I'm keen on this solution.  We have this code in the creset path
> which is calling phb4_init_hw()
> 
> 	case PHB4_SLOT_CRESET_REINIT:
> 		PHBDBG(p, "CRESET: Reinitialization\n");
> 		p->flags &= ~PHB4_AIB_FENCED;
> 		p->flags &= ~PHB4_CAPP_RECOVERY;
> 		p->flags &= ~PHB4_CFG_USE_ASB;
> 		phb4_init_hw(p, false);
> 		pci_slot_set_state(slot, PHB4_SLOT_CRESET_FRESET);
> 		return pci_slot_set_sm_timeout(slot, msecs_to_tb(100));
> 
> It seems we are clearing it, and then you are setting it immediately after. 
> Seems like the initial clearing would be wrong and we're just papering over the
> issue.
> 

Thanks for the review Mikey! I saw this code, and you're right - we
might remove it! But even if we don't clear the ASB flag...it does not
mean we'll have it set, correct?

So, perhaps instead of clearing we should _set it_ on the
switch..tomorrow I'll do more experiments on this, since it seems a
valid path of investigation.

Cheers,


Guilherme

> Mikey
> 
> 
>>  	/* Init_1 - Sync reset
>>  	 *
>>  	 * At this point we assume the PHB has already been reset.
>> @@ -4387,6 +4391,9 @@ static void phb4_init_hw(struct phb4 *p, bool
>> first_init)
>>  
>>  	phb4_write_reg(p, PHB_CTRLR, val);
>>  
>> +        if (!first_init)
>> +                p->flags &= ~PHB4_CFG_USE_ASB;
>> +
>>  	/* Init_18..41 - Architected IODA3 inits */
>>  	phb4_init_ioda3(p);
>>  



More information about the Skiboot mailing list