[Skiboot] [PATCH 2/2] platform/mihawk: Tune equalization settings for opencapi

Andrew Donnellan ajd at linux.ibm.com
Wed Apr 15 12:15:51 AEST 2020


On 10/4/20 12:05 am, Frederic Barrat wrote:
> 
>>>> -#define MARGIN_RATIO        (0)
>>>> -#define FFE_PRE_COEFF        (0)
>>>> -#define FFE_POST_COEFF        (0)
>>>> +int ffe_pre_coeff = 0;
>>>> +int ffe_post_coeff = 0;
>>>
>>> Is there any way to do this without exposing global variables? (My 
>>> primary objection is that global variables for specific things in 
>>> specific subsystems is ugly and inelegant)
>>
>>
>> So those parameters are input parameters when computing the zcal and 
>> we need a new per-platform way of defining them. So one way or 
>> another, we'll end up with some kind of per-platform global, I think. 
>> And I agree it would be a bit better than a pure global. I went this 
>> way as a compromise between minimizing the impact on the "nvlink on 
>> witherspoon" path and giving us flexibility to hack anything for 
>> opencapi. The whole thing was highly empirical and feels like a hack 
>> anyway.
>>
>> Another option I can think of would be to have a per-platform hook 
>> (and no longer in the platform_ocapi struct) at the beginning of 
>> phy_tx_zcal_calculate(), defaulting to the current 0 values if none 
>> are defined. The hook would give the values to use for the 
>> ffe_pre_coeff and ffe_post_coeff parameters. Probably a bit cleaner, 
>> but doesn't feel as easily extensible in the future if needed, I think.
> 
> 
> Andrew, so do you think we can live with it or do you see a better 
> option (proposal above or else)?

Throw it in the platform_ocapi struct alongside all the other platform 
specific opencapi parameters?

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd at linux.ibm.com             IBM Australia Limited



More information about the Skiboot mailing list