[PATCH] cxl: Add support for ASB_Notify on POWER9
christophe lombard
clombard at linux.vnet.ibm.com
Mon Nov 27 21:17:00 AEDT 2017
Le 27/11/2017 à 05:03, Michael Ellerman a écrit :
> christophe lombard <clombard at linux.vnet.ibm.com> writes:
>
>> Le 24/11/2017 à 14:02, Benjamin Herrenschmidt a écrit :
>>> On Fri, 2017-11-24 at 11:14 +0100, christophe lombard wrote:
>>>> To my knowledge, there is no property (or similar), somewhere, that
>>>> indicating that the TIDR is supported or not.
>>>> For the time being, if I am not wrong, the only check we have, is
>>>> this condition in the function set_thread_tidr(struct task_struct *t):
>>>>
>>>> if (!cpu_has_feature(CPU_FTR_ARCH_300))
>>>> return -EINVAL;
>>>>
>>>>
>>>> Christophe
>>>
>>> Then we need to fix that
>>>
>>> Ben.
>>>
>>
>> You are right. We will insert a checking in the cxl driver to allow
>> updating the TIDR if a P9 is present. This will be in the patch V2.
>> Thanks
>
> A cxl_is_power9() check should be fine.
>
> When the check fails you should return an error code that can be
> distinguished and interpreted correctly by userspace, ie. not EINVAL.
> That implies if the program calls with a different set of arguments the
> call might succeed, which is not true.
>
> Either ENODEV or ENXIO would be best I think.
>
> cheers
>
This is what I had in mind about the function cxl_is_power9() and I am
agree with the return codes.
Thanks for your help.
Christophe
More information about the Linuxppc-dev
mailing list