diff mbox series

[v2] opal-api: Reserve 2 OPAL API calls for future OpenCAPI LPC use

Message ID 20190320041636.19519-1-andrew.donnellan@au1.ibm.com
State Accepted
Headers show
Series [v2] opal-api: Reserve 2 OPAL API calls for future OpenCAPI LPC use | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (92a5c57a14e24a60c306a9106bd6415c03f1234d)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Andrew Donnellan March 20, 2019, 4:16 a.m. UTC
OpenCAPI Lowest Point of Coherency (LPC) memory is going to require
some extra OPAL calls to set up NPU BARs. These calls will most likely be
called OPAL_NPU_LPC_ALLOC and OPAL_NPU_LPC_RELEASE, we're not quite ready
to upstream that code yet though.

Reserve 171 and 172 for this purpose.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

---

v1->v2:
- rebase on mainline
- add explanatory comment

The LPC allocator code is coming once I get a chance to work on it
again after finishing my current OpenCAPI work. We have a trivial allocator
that we've been using internally for testing, and Alastair wants to start
getting the kernel side of this ready.
---
 include/opal-api.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Stewart Smith March 20, 2019, 6:38 a.m. UTC | #1
Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
> OpenCAPI Lowest Point of Coherency (LPC) memory is going to require
> some extra OPAL calls to set up NPU BARs. These calls will most likely be
> called OPAL_NPU_LPC_ALLOC and OPAL_NPU_LPC_RELEASE, we're not quite ready
> to upstream that code yet though.
>
> Reserve 171 and 172 for this purpose.
>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

We're probably going to want to name it something other than LPC to
avoid confusion with the LPC bus for some poor soul knee deep in
something terrible.

Maybe if we refer to it as LPoC when the abbreviation is used?

> The LPC allocator code is coming once I get a chance to work on it
> again after finishing my current OpenCAPI work. We have a trivial allocator
> that we've been using internally for testing, and Alastair wants to start
> getting the kernel side of this ready.

> ---
>  include/opal-api.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/opal-api.h b/include/opal-api.h
> index 73f86f9a5ccf..acf05746f01f 100644
> --- a/include/opal-api.h
> +++ b/include/opal-api.h
> @@ -226,7 +226,9 @@
>  #define OPAL_NX_COPROC_INIT			167
>  #define OPAL_NPU_SET_RELAXED_ORDER		168
>  #define OPAL_NPU_GET_RELAXED_ORDER		169
> -#define OPAL_LAST				169
> +#define OPAL_NPU_RESERVED1			170  /* LPC Allocate */
> +#define OPAL_NPU_RESERVED2			171  /* LPC Release */
> +#define OPAL_LAST				171
>  
>  #define QUIESCE_HOLD			1 /* Spin all calls at entry */
>  #define QUIESCE_REJECT			2 /* Fail all calls with OPAL_BUSY */
> -- 
> 2.11.0
>
> _______________________________________________
> Skiboot mailing list
> Skiboot@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
>
Andrew Donnellan March 20, 2019, 6:55 a.m. UTC | #2
On 20/3/19 5:38 pm, Stewart Smith wrote:
> Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
>> OpenCAPI Lowest Point of Coherency (LPC) memory is going to require
>> some extra OPAL calls to set up NPU BARs. These calls will most likely be
>> called OPAL_NPU_LPC_ALLOC and OPAL_NPU_LPC_RELEASE, we're not quite ready
>> to upstream that code yet though.
>>
>> Reserve 171 and 172 for this purpose.
>>
>> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> 
> We're probably going to want to name it something other than LPC to
> avoid confusion with the LPC bus for some poor soul knee deep in
> something terrible.
> 
> Maybe if we refer to it as LPoC when the abbreviation is used?

My preference would be to keep things consistent between our skiboot 
usage and the hardware documentation, but I *think* the term "LPC" is 
deprecated in the HW documentation anyway in favour of just "memory"... 
I'll see...

> 
>> The LPC allocator code is coming once I get a chance to work on it
>> again after finishing my current OpenCAPI work. We have a trivial allocator
>> that we've been using internally for testing, and Alastair wants to start
>> getting the kernel side of this ready.
> 
>> ---
>>   include/opal-api.h | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/opal-api.h b/include/opal-api.h
>> index 73f86f9a5ccf..acf05746f01f 100644
>> --- a/include/opal-api.h
>> +++ b/include/opal-api.h
>> @@ -226,7 +226,9 @@
>>   #define OPAL_NX_COPROC_INIT			167
>>   #define OPAL_NPU_SET_RELAXED_ORDER		168
>>   #define OPAL_NPU_GET_RELAXED_ORDER		169
>> -#define OPAL_LAST				169
>> +#define OPAL_NPU_RESERVED1			170  /* LPC Allocate */
>> +#define OPAL_NPU_RESERVED2			171  /* LPC Release */
>> +#define OPAL_LAST				171
>>   
>>   #define QUIESCE_HOLD			1 /* Spin all calls at entry */
>>   #define QUIESCE_REJECT			2 /* Fail all calls with OPAL_BUSY */
>> -- 
>> 2.11.0
>>
>> _______________________________________________
>> Skiboot mailing list
>> Skiboot@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/skiboot
>>
>
Joel Stanley March 20, 2019, 7:04 a.m. UTC | #3
On Wed, 20 Mar 2019 at 06:39, Stewart Smith <stewart@linux.ibm.com> wrote:
>
> Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
> > OpenCAPI Lowest Point of Coherency (LPC) memory is going to require
> > some extra OPAL calls to set up NPU BARs. These calls will most likely be
> > called OPAL_NPU_LPC_ALLOC and OPAL_NPU_LPC_RELEASE, we're not quite ready
> > to upstream that code yet though.
> >
> > Reserve 171 and 172 for this purpose.
> >
> > Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
>
> We're probably going to want to name it something other than LPC to
> avoid confusion with the LPC bus for some poor soul knee deep in
> something terrible.

Yes please. I was considering replying with the same comment.

Cheers,

Joel
Andrew Donnellan April 1, 2019, 4:44 a.m. UTC | #4
On 20/3/19 5:38 pm, Stewart Smith wrote:
> Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
>> OpenCAPI Lowest Point of Coherency (LPC) memory is going to require
>> some extra OPAL calls to set up NPU BARs. These calls will most likely be
>> called OPAL_NPU_LPC_ALLOC and OPAL_NPU_LPC_RELEASE, we're not quite ready
>> to upstream that code yet though.
>>
>> Reserve 171 and 172 for this purpose.
>>
>> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> 
> We're probably going to want to name it something other than LPC to
> avoid confusion with the LPC bus for some poor soul knee deep in
> something terrible.
> 
> Maybe if we refer to it as LPoC when the abbreviation is used?

Can we get this merged perhaps with a note that I'll pick a better name 
not involving "LPC"? I'm thinking "OPAL_NPU_OCAPI_MEM_{ALLOC,RELEASE}" 
at the moment.

> 
>> The LPC allocator code is coming once I get a chance to work on it
>> again after finishing my current OpenCAPI work. We have a trivial allocator
>> that we've been using internally for testing, and Alastair wants to start
>> getting the kernel side of this ready.
> 
>> ---
>>   include/opal-api.h | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/opal-api.h b/include/opal-api.h
>> index 73f86f9a5ccf..acf05746f01f 100644
>> --- a/include/opal-api.h
>> +++ b/include/opal-api.h
>> @@ -226,7 +226,9 @@
>>   #define OPAL_NX_COPROC_INIT			167
>>   #define OPAL_NPU_SET_RELAXED_ORDER		168
>>   #define OPAL_NPU_GET_RELAXED_ORDER		169
>> -#define OPAL_LAST				169
>> +#define OPAL_NPU_RESERVED1			170  /* LPC Allocate */
>> +#define OPAL_NPU_RESERVED2			171  /* LPC Release */
>> +#define OPAL_LAST				171
>>   
>>   #define QUIESCE_HOLD			1 /* Spin all calls at entry */
>>   #define QUIESCE_REJECT			2 /* Fail all calls with OPAL_BUSY */
>> -- 
>> 2.11.0
>>
>> _______________________________________________
>> Skiboot mailing list
>> Skiboot@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/skiboot
>>
>
Stewart Smith April 11, 2019, 4:48 a.m. UTC | #5
Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
> OpenCAPI Lowest Point of Coherency (LPC) memory is going to require
> some extra OPAL calls to set up NPU BARs. These calls will most likely be
> called OPAL_NPU_LPC_ALLOC and OPAL_NPU_LPC_RELEASE, we're not quite ready
> to upstream that code yet though.
>
> Reserve 171 and 172 for this purpose.

Merged to master as of 73cd109ecd8f6b64f67f62538674b76e1af946a1 with the
change of actually reserving 171 and 172 which are the current next two
API call numbers.
diff mbox series

Patch

diff --git a/include/opal-api.h b/include/opal-api.h
index 73f86f9a5ccf..acf05746f01f 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -226,7 +226,9 @@ 
 #define OPAL_NX_COPROC_INIT			167
 #define OPAL_NPU_SET_RELAXED_ORDER		168
 #define OPAL_NPU_GET_RELAXED_ORDER		169
-#define OPAL_LAST				169
+#define OPAL_NPU_RESERVED1			170  /* LPC Allocate */
+#define OPAL_NPU_RESERVED2			171  /* LPC Release */
+#define OPAL_LAST				171
 
 #define QUIESCE_HOLD			1 /* Spin all calls at entry */
 #define QUIESCE_REJECT			2 /* Fail all calls with OPAL_BUSY */