[Skiboot] [PATCH v12 08/10] skiboot: Add opal call to enable/disable Nest IMC

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Sat Jun 17 16:21:02 AEST 2017



On Saturday 17 June 2017 05:13 AM, Michael Neuling wrote:
>> +	case OPAL_IMC_COUNTERS_NEST:
>> +		/* Fetch the IMC control block structure */
>> +		cb = get_imc_cb();
>> +		status = be64_to_cpu(cb->imc_chip_run_status);
>> +
>> +		/* Check whether the engine is already running */
>> +		if (status == NEST_IMC_RUNNING)
>> +			return ret;
>> +
>> +		/* Set the run command */
>> +		op = NEST_IMC_ENABLE;
>> +
>> +		/* Write the command to the control block now */
>> +		cb->imc_chip_command = op;
>> +
> BTW on this, I think you really need to just set the command to what you want
> rather than checking what's running first
Yes. Will remove the check.

Thanks for review.
Maddy

>
> Say you're stopped and then you do quickly:  start command then stop command.
> The IMC may not have seen the start command before you send the stop command.
> So the stop command will not set the command since it still thinks it's stopped.
>   And then you end up in the wrong mode when the micro code comes in a still sees
> a start command.
>
> Mikey



More information about the Skiboot mailing list