Message ID | 1436115333-18657-11-git-send-email-maddy@linux.vnet.ibm.com |
---|---|
State | Changes Requested |
Headers | show |
Madhavan Srinivasan <maddy@linux.vnet.ibm.com> writes: > Patch adds a new OPAL call to start and stop PORE Thread Scheduler(PTS) > for Nest PMU Counter collection. This needs to be documented in doc/opal-api - including completely how the kernel should read things, and if there's other docs/data structures to read, what and where those docs are.
On Friday 10 July 2015 12:09 PM, Stewart Smith wrote: > Madhavan Srinivasan <maddy@linux.vnet.ibm.com> writes: >> Patch adds a new OPAL call to start and stop PORE Thread Scheduler(PTS) >> for Nest PMU Counter collection. > This needs to be documented in doc/opal-api - including completely how > the kernel should read things, and if there's other docs/data structures > to read, what and where those docs are. Yes. my bad. I will add the docs. Also I am revisiting the api parameters, so I may have a change to current opal-api proposal. Will soon post it. Thanks for review Maddy
diff --git a/hw/nest.c b/hw/nest.c index fc83589..4ff9302 100644 --- a/hw/nest.c +++ b/hw/nest.c @@ -434,3 +434,18 @@ void nest_ima_init(void) return; } + +static int64_t opal_nest_ima_control(uint32_t value) +{ + struct proc_chip *chip; + int rc = IMA_PTS_ERROR; + + chip = get_chip(pir_to_chip_id(this_cpu()->pir)); + if (value) + rc = xscom_write(chip->id, IMA_PTS_SCOM, IMA_PTS_ENABLE); + else + rc = xscom_write(chip->id, IMA_PTS_SCOM, IMA_PTS_DISABLE); + + return rc; +} +opal_call (OPAL_NEST_IMA_CONTROL, opal_nest_ima_control, 1); diff --git a/include/opal-api.h b/include/opal-api.h index d58c8bf..4f6eda7 100644 --- a/include/opal-api.h +++ b/include/opal-api.h @@ -161,7 +161,8 @@ #define OPAL_PRD_MSG 113 #define OPAL_LEDS_GET_INDICATOR 114 #define OPAL_LEDS_SET_INDICATOR 115 -#define OPAL_LAST 115 +#define OPAL_NEST_IMA_CONTROL 116 +#define OPAL_LAST 116 /* Device tree flags */
Patch adds a new OPAL call to start and stop PORE Thread Scheduler(PTS) for Nest PMU Counter collection. Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> --- hw/nest.c | 15 +++++++++++++++ include/opal-api.h | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-)