[Skiboot] [PATCH] occ: Poll OCC throttle status and queue OCC events to host
Shilpasri G Bhat
shilpa.bhat at linux.vnet.ibm.com
Thu Apr 23 21:58:49 AEST 2015
Hi Preeti,
On 04/23/2015 04:40 PM, Preeti U Murthy wrote:
> Hi Shilpa,
>
> On 04/22/2015 10:04 PM, Shilpasri G Bhat wrote:
>> + chip->prev_throttle = occ_data->throttle;
>
> Why do you do this ? ^^^^
>
> Why cant we initialize prev_throttle to 0x00 - No throttle at boot and
> on each OCC reset ? I did not see the point of introducing another value
> to initialize prev_throttle.
Yes agree. I can initialize prev_throttle to '0' and skip the above assignment.
>
>> + }
>> + }
>> + if (!inactive) {
>> + occ_reset = false;
>> + /*
>> + * Queue OCC_THROTTLE with throttle status as 0 to
>> + * indicate all OCCs are active after a reset.
>> + */
>> + opal_queue_msg(OPAL_MSG_OCC, NULL, NULL,
>> + OCC_THROTTLE, 0, 0);
>
> Note that opal_queue_msg() is expected to fail. So we should handle it.
> Refer to the other call sites to get an idea. Should we do something
> like cancel the poller if the queuing of messages fail ?
I think adding a pr_log would suffice if any of the opal_queue_msg fails except
throttle as we are just reporting the status of OCC and not taking any action
based on the event. For throttle/unthrottle message we can skip the
prev_throttle/occ_reset update if we fail to queue the message so that we can
retry queuing it the next time occ_throttle_poll() is called,
Thanks and Regards,
Shilpa
More information about the Skiboot
mailing list