diff mbox series

[v2,2/5] skiboot: Edit documentation for IMC opal call to include trace-imc

Message ID 20181212061545.9756-3-anju@linux.vnet.ibm.com
State Changes Requested
Headers show
Series skiboot: OPAL support for IMC trace-mode | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master

Commit Message

Anju T Sudhakar Dec. 12, 2018, 6:15 a.m. UTC
OPAL call APIs for In-Memory Collection Counter infrastructure(IMC),
includes a new device type called OPAL_IMC_COUNTERS_TRACE. Edit the
documentation to include this information.

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
 doc/opal-api/opal-imc-counters.rst | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

Comments

Stewart Smith Feb. 25, 2019, 4:10 a.m. UTC | #1
Anju T Sudhakar <anju@linux.vnet.ibm.com> writes:
> OPAL call APIs for In-Memory Collection Counter infrastructure(IMC),
> includes a new device type called OPAL_IMC_COUNTERS_TRACE. Edit the
> documentation to include this information.
>
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
>  doc/opal-api/opal-imc-counters.rst | 28 ++++++++++++++++------------
>  1 file changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/doc/opal-api/opal-imc-counters.rst b/doc/opal-api/opal-imc-counters.rst
> index d0b4d960..6fe56aa3 100644
> --- a/doc/opal-api/opal-imc-counters.rst
> +++ b/doc/opal-api/opal-imc-counters.rst
> @@ -4,7 +4,7 @@ OPAL_IMC_COUNTERS_INIT
>  ==============================
>  OPAL call interface to initialize In-memory collection
>  infrastructure. Call does multiple scom writes on each
> -incavation for Core IMC initialization. And for the
> +invocation for Core/Trace IMC initialization. And for the
>  Nest IMC, at this point, call is a no-op and returns
>  OPAL_SUCCESS. Incase of kexec, OS driver should first
>  stop the engine via OPAL_IMC_COUNTER_STOP(and then
> @@ -15,16 +15,20 @@ the engine via OPAL_IMC_COUNTER_STOP.
>  OPAL does sanity checks to detect unknown or
>  unsupported IMC device type and nest units.
>  check_imc_device_type() function removes
> -unsupported IMC device type. disable_unavailable_units()
> -removes unsupported nest units by the microcode.
> -This way OPAL can lock down and advertise only
> -supported device type and nest units.
> +unsupported IMC device type, and in case of
> +trace-node it ensures that the node is added
> +only for Nimbus DD2.2 and later chip versions.
> +disable_unavailable_units() removes unsupported
> +nest units by the microcode. This way OPAL can
> +lock down and advertise only supported device
> +type and nest units.

How do you determine from the device tree which `type` to initialise?

>  Parameters
>  ----------
>  ``uint32_t type``
>    This parameter specifies the imc counter domain.
> -  The value should be 'OPAL_IMC_COUNTERS_CORE'
> +  The value should be either 'OPAL_IMC_COUNTERS_CORE'
> +  or 'OPAL_IMC_COUNTERS_TRACE'.


Perhaps at this point just list all of them? INIT can be called for
Nest, even though it's *currently* a no-op for P9.

>  ``uint64_t addr``
>    This parameter must have a non-zero value.
> @@ -43,14 +47,14 @@ OPAL_SUCCESS   - On succesfully initialized or even if init operation is a no-op
>  OPAL_IMC_COUNTERS_START
>  ============================
>  OPAL call interface for starting the In-Memory Collection
> -counters for a specified domain (NEST/CORE).
> +counters for a specified domain (NEST/CORE/TRACE).
>
>  Parameters
>  ----------
>  ``uint32_t type``
>   This parameter specifies the imc counter domain.
> - The value can be either 'OPAL_IMC_COUNTERS_NEST'
> - or 'OPAL_IMC_COUNTERS_CORE'
> + The value can be 'OPAL_IMC_COUNTERS_NEST',
> + 'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'.
>
>  ``uint64_t cpu_pir``
>    This parameter specifices target cpu pir
> @@ -65,7 +69,7 @@ OPAL_SUCCESS   - On successful execution of the operation for the given ``type``
>  OPAL_IMC_COUNTERS_STOP
>  ===========================
>  OPAL call interface for stoping In-Memory
> -Collection counters for a specified domain (NEST/CORE).
> +Collection counters for a specified domain (NEST/CORE/TRACE).
>  STOP should always be called after a related START.
>  While STOP *may* run successfully without an associated
>  START call, this is not gaurenteed.
> @@ -74,8 +78,8 @@ Parameters
>  ----------
>  ``uint32_t type``
>   This parameter specifies the imc counter domain.
> - The value can be either 'OPAL_IMC_COUNTERS_NEST'
> - or 'OPAL_IMC_COUNTERS_CORE'
> + The value can be 'OPAL_IMC_COUNTERS_NEST',
> + 'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'
>
>  ``uint64_t cpu_pir``
>    This parameter specifices target cpu pir
> -- 
> 2.17.1
>
Anju T Sudhakar March 11, 2019, 5:48 a.m. UTC | #2
Hi,

On 2/25/19 9:40 AM, Stewart Smith wrote:
> Anju T Sudhakar <anju@linux.vnet.ibm.com> writes:
>> OPAL call APIs for In-Memory Collection Counter infrastructure(IMC),
>> includes a new device type called OPAL_IMC_COUNTERS_TRACE. Edit the
>> documentation to include this information.
>>
>> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
>> Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
>> ---
>>   doc/opal-api/opal-imc-counters.rst | 28 ++++++++++++++++------------
>>   1 file changed, 16 insertions(+), 12 deletions(-)
>>
>> diff --git a/doc/opal-api/opal-imc-counters.rst b/doc/opal-api/opal-imc-counters.rst
>> index d0b4d960..6fe56aa3 100644
>> --- a/doc/opal-api/opal-imc-counters.rst
>> +++ b/doc/opal-api/opal-imc-counters.rst
>> @@ -4,7 +4,7 @@ OPAL_IMC_COUNTERS_INIT
>>   ==============================
>>   OPAL call interface to initialize In-memory collection
>>   infrastructure. Call does multiple scom writes on each
>> -incavation for Core IMC initialization. And for the
>> +invocation for Core/Trace IMC initialization. And for the
>>   Nest IMC, at this point, call is a no-op and returns
>>   OPAL_SUCCESS. Incase of kexec, OS driver should first
>>   stop the engine via OPAL_IMC_COUNTER_STOP(and then
>> @@ -15,16 +15,20 @@ the engine via OPAL_IMC_COUNTER_STOP.
>>   OPAL does sanity checks to detect unknown or
>>   unsupported IMC device type and nest units.
>>   check_imc_device_type() function removes
>> -unsupported IMC device type. disable_unavailable_units()
>> -removes unsupported nest units by the microcode.
>> -This way OPAL can lock down and advertise only
>> -supported device type and nest units.
>> +unsupported IMC device type, and in case of
>> +trace-node it ensures that the node is added
>> +only for Nimbus DD2.2 and later chip versions.
>> +disable_unavailable_units() removes unsupported
>> +nest units by the microcode. This way OPAL can
>> +lock down and advertise only supported device
>> +type and nest units.
> How do you determine from the device tree which `type` to initialise?

For trace-mode?  We add only supported nodes/device types in the device 
tree.

And each node will have the 'type' value specified in the 
device-tree(which is provided by the catalog).

So while doing an opal-call to initialize, we pass the 'type' parameter 
also.


>>   Parameters
>>   ----------
>>   ``uint32_t type``
>>     This parameter specifies the imc counter domain.
>> -  The value should be 'OPAL_IMC_COUNTERS_CORE'
>> +  The value should be either 'OPAL_IMC_COUNTERS_CORE'
>> +  or 'OPAL_IMC_COUNTERS_TRACE'.
>
> Perhaps at this point just list all of them? INIT can be called for
> Nest, even though it's *currently* a no-op for P9.


OK. I will list IMC_COUNTERS_NEST also here.

Thanks,

Anju

>>   ``uint64_t addr``
>>     This parameter must have a non-zero value.
>> @@ -43,14 +47,14 @@ OPAL_SUCCESS   - On succesfully initialized or even if init operation is a no-op
>>   OPAL_IMC_COUNTERS_START
>>   ============================
>>   OPAL call interface for starting the In-Memory Collection
>> -counters for a specified domain (NEST/CORE).
>> +counters for a specified domain (NEST/CORE/TRACE).
>>
>>   Parameters
>>   ----------
>>   ``uint32_t type``
>>    This parameter specifies the imc counter domain.
>> - The value can be either 'OPAL_IMC_COUNTERS_NEST'
>> - or 'OPAL_IMC_COUNTERS_CORE'
>> + The value can be 'OPAL_IMC_COUNTERS_NEST',
>> + 'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'.
>>
>>   ``uint64_t cpu_pir``
>>     This parameter specifices target cpu pir
>> @@ -65,7 +69,7 @@ OPAL_SUCCESS   - On successful execution of the operation for the given ``type``
>>   OPAL_IMC_COUNTERS_STOP
>>   ===========================
>>   OPAL call interface for stoping In-Memory
>> -Collection counters for a specified domain (NEST/CORE).
>> +Collection counters for a specified domain (NEST/CORE/TRACE).
>>   STOP should always be called after a related START.
>>   While STOP *may* run successfully without an associated
>>   START call, this is not gaurenteed.
>> @@ -74,8 +78,8 @@ Parameters
>>   ----------
>>   ``uint32_t type``
>>    This parameter specifies the imc counter domain.
>> - The value can be either 'OPAL_IMC_COUNTERS_NEST'
>> - or 'OPAL_IMC_COUNTERS_CORE'
>> + The value can be 'OPAL_IMC_COUNTERS_NEST',
>> + 'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'
>>
>>   ``uint64_t cpu_pir``
>>     This parameter specifices target cpu pir
>> -- 
>> 2.17.1
>>
diff mbox series

Patch

diff --git a/doc/opal-api/opal-imc-counters.rst b/doc/opal-api/opal-imc-counters.rst
index d0b4d960..6fe56aa3 100644
--- a/doc/opal-api/opal-imc-counters.rst
+++ b/doc/opal-api/opal-imc-counters.rst
@@ -4,7 +4,7 @@  OPAL_IMC_COUNTERS_INIT
 ==============================
 OPAL call interface to initialize In-memory collection
 infrastructure. Call does multiple scom writes on each
-incavation for Core IMC initialization. And for the
+invocation for Core/Trace IMC initialization. And for the
 Nest IMC, at this point, call is a no-op and returns
 OPAL_SUCCESS. Incase of kexec, OS driver should first
 stop the engine via OPAL_IMC_COUNTER_STOP(and then
@@ -15,16 +15,20 @@  the engine via OPAL_IMC_COUNTER_STOP.
 OPAL does sanity checks to detect unknown or
 unsupported IMC device type and nest units.
 check_imc_device_type() function removes
-unsupported IMC device type. disable_unavailable_units()
-removes unsupported nest units by the microcode.
-This way OPAL can lock down and advertise only
-supported device type and nest units.
+unsupported IMC device type, and in case of
+trace-node it ensures that the node is added
+only for Nimbus DD2.2 and later chip versions.
+disable_unavailable_units() removes unsupported
+nest units by the microcode. This way OPAL can
+lock down and advertise only supported device
+type and nest units.
 
 Parameters
 ----------
 ``uint32_t type``
   This parameter specifies the imc counter domain.
-  The value should be 'OPAL_IMC_COUNTERS_CORE'
+  The value should be either 'OPAL_IMC_COUNTERS_CORE'
+  or 'OPAL_IMC_COUNTERS_TRACE'.
 
 ``uint64_t addr``
   This parameter must have a non-zero value.
@@ -43,14 +47,14 @@  OPAL_SUCCESS   - On succesfully initialized or even if init operation is a no-op
 OPAL_IMC_COUNTERS_START
 ============================
 OPAL call interface for starting the In-Memory Collection
-counters for a specified domain (NEST/CORE).
+counters for a specified domain (NEST/CORE/TRACE).
 
 Parameters
 ----------
 ``uint32_t type``
  This parameter specifies the imc counter domain.
- The value can be either 'OPAL_IMC_COUNTERS_NEST'
- or 'OPAL_IMC_COUNTERS_CORE'
+ The value can be 'OPAL_IMC_COUNTERS_NEST',
+ 'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'.
 
 ``uint64_t cpu_pir``
   This parameter specifices target cpu pir
@@ -65,7 +69,7 @@  OPAL_SUCCESS   - On successful execution of the operation for the given ``type``
 OPAL_IMC_COUNTERS_STOP
 ===========================
 OPAL call interface for stoping In-Memory
-Collection counters for a specified domain (NEST/CORE).
+Collection counters for a specified domain (NEST/CORE/TRACE).
 STOP should always be called after a related START.
 While STOP *may* run successfully without an associated
 START call, this is not gaurenteed.
@@ -74,8 +78,8 @@  Parameters
 ----------
 ``uint32_t type``
  This parameter specifies the imc counter domain.
- The value can be either 'OPAL_IMC_COUNTERS_NEST'
- or 'OPAL_IMC_COUNTERS_CORE'
+ The value can be 'OPAL_IMC_COUNTERS_NEST',
+ 'OPAL_IMC_COUNTERS_CORE' or 'OPAL_IMC_COUNTERS_TRACE'
 
 ``uint64_t cpu_pir``
   This parameter specifices target cpu pir