linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: christophe lombard <clombard@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	benh@au1.ibm.com, linuxppc-dev@lists.ozlabs.org,
	fbarrat@linux.vnet.ibm.com, vaibhav@linux.vnet.ibm.com,
	andrew.donnellan@au1.ibm.com
Subject: Re: [PATCH] cxl: Add support for ASB_Notify on POWER9
Date: Mon, 27 Nov 2017 11:17:00 +0100	[thread overview]
Message-ID: <b3d193fb-22fa-c8e8-352b-366e219ed2d7@linux.vnet.ibm.com> (raw)
In-Reply-To: <87zi782ws1.fsf@concordia.ellerman.id.au>

Le 27/11/2017 à 05:03, Michael Ellerman a écrit :
> christophe lombard <clombard@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

      reply	other threads:[~2017-11-27 10:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 11:05 [PATCH] cxl: Add support for ASB_Notify on POWER9 Christophe Lombard
2017-11-23 14:16 ` Vaibhav Jain
2017-11-23 16:15   ` christophe lombard
2017-11-23 20:41 ` Benjamin Herrenschmidt
2017-11-24 10:14   ` christophe lombard
2017-11-24 13:02     ` Benjamin Herrenschmidt
2017-11-24 16:37       ` christophe lombard
2017-11-24 19:54         ` Benjamin Herrenschmidt
2017-11-27  4:03         ` Michael Ellerman
2017-11-27 10:17           ` christophe lombard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3d193fb-22fa-c8e8-352b-366e219ed2d7@linux.vnet.ibm.com \
    --to=clombard@linux.vnet.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=benh@au1.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=vaibhav@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).