[Skiboot] [PATCH v12 08/10] skiboot: Add opal call to enable/disable Nest IMC
mikey at neuling.org
Sat Jun 17 09:43:17 AEST 2017
> + 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
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.
More information about the Skiboot