[Skiboot] [PATCH v7 9/9] Add OPAL call to enable/disable nest pmu
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Thu Mar 3 15:52:42 AEDT 2016
On Wednesday 02 March 2016 12:56 PM, Joel Stanley wrote:
> On Tue, Mar 1, 2016 at 9:10 PM, Madhavan Srinivasan
> <maddy at linux.vnet.ibm.com> wrote:
>> + -For other modes, this parameter is undefined for now.
>> +
>> +OPAL_NEST_COUNTERS_CONTROL will return:
>> + OPAL_SUCCESS on success and IMA_PTS_ERROR on failure.
>> +static int64_t opal_nest_counters_control(uint64_t mode, uint64_t value_1,
>> + uint64_t value_2, uint64_t value_3)
>> +{
>> + struct proc_chip *chip;
>> + u64 op;
>> +
>> + chip = get_chip(this_cpu()->chip_id);
>> + if (mode == IMA_CHIP_PRODUCTION_MODE &&
>> + !value_2 && !value_3) {
>> + op = value_1 ? IMA_PTS_ENABLE: IMA_PTS_DISABLE;
>> + if ((chip->type == PROC_CHIP_P8_MURANO) ||
>> + (chip->type == PROC_CHIP_P8_VENICE) ||
>> + (chip->type == PROC_CHIP_P8_NAPLES))
>> + return OPAL_SUCCESS;
>> + xscom_write(chip->id, IMA_PTS_SCOM, op);
>> + return OPAL_SUCCESS;
>> + }
>> +
>> + return IMA_PTS_ERROR;
> I think we want to return one of the OPAL_* defines from opal-api.h here.
>
> https://github.com/open-power/skiboot/blob/skiboot-5.2.0-rc1/include/opal-api.h#L22
>
Ok will change it.
Maddy
More information about the Skiboot
mailing list