[PATCH] cxl: Add support for ASB_Notify on POWER9

Michael Ellerman mpe at ellerman.id.au
Mon Nov 27 15:03:26 AEDT 2017


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


More information about the Linuxppc-dev mailing list