[RFC PATCH 1/2] powerpc/powernv: Add support for CXL mode switch that need PHB reset

Vaibhav Jain vaibhav at linux.ibm.com
Tue Jan 29 16:13:23 AEDT 2019


Thanks for reviewing this patch Christophe,

christophe lombard <clombard at linux.vnet.ibm.com> writes:

>> 
>>   	pe = pnv_ioda_get_pe(dev);
>>   	if (!pe)
>> -		return -ENODEV;
>> +		return -ENOENT;
>
> The return code of pnv_phb_to_cxl_mode() is also returned by an api in 
> the cxllib librarie. So, hoping that nobody test the value !!

Agreed. I did peek into cxllib_switch_phb_mode() before sending the
patch and saw two conflicting cases. While switching to CXL_MODE_PCI we
make sure that we return kernel error codes and while switching to
CXL_MODE_CXL we return OPAL error codes.

I havent seen how CX5 handles return values from this function but I am
betting thats its the usual zero & non-zero return value check, which
then should work with the proposed change.

-- 
Vaibhav Jain <vaibhav at linux.ibm.com>
Linux Technology Center, IBM India Pvt. Ltd.



More information about the Linuxppc-dev mailing list