[Skiboot] [RFC 2/3] phb4/capp: Introduce 'stq-buffers' capp attribute override

Frederic Barrat fbarrat at linux.ibm.com
Wed Sep 12 01:39:42 AEST 2018



Le 09/09/2018 à 13:41, Vaibhav Jain a écrit :
> +
> +	/* Calculate the number of stq engines needed */
> +	if (capp_eng & CAPP_MAX_STQ_ENGINES) {
> +		/* 14 CAPP msg engines or 6 based on link width */
> +		stq_eng = link_width_x16 ? 14 : 6;
> +	} else if (capp_eng & CAPP_MIN_STQ_ENGINES) {
> +		/* 2 CAPP msg engines */
> +		stq_eng = 2;
> +	}
> +	stq_eng = (capp_get_override(&p->phb, "stq-buffers", stq_eng) & 0xF);
> +

This is what I like the most. Have a policy for the number of engines, 
then build set the CAPP setup for it. But we still have 2 flows: one for 
PEC, one for CAPP. Can't we just have that code at the beginning of 
enable_capi_mode() and pass the engine count to the capp setup function? 
Only one read ofthe nvram setting should be needed. Same thing to figure 
out the link width for PEC2.

And same logic applies for the dma engine count (next patch).
Then hopefully, next time we update the engine counts, the PEC and CAPP 
setups will be computed correctly the first time :-)

   Fred



More information about the Skiboot mailing list