[Skiboot] [PATCH] ipmi: call check_timers() while waiting for synchronous messages to complete

Cédric Le Goater clg at kaod.org
Fri Apr 5 03:12:46 AEDT 2019


On 4/4/19 6:01 PM, Vasant Hegde wrote:
> On 04/04/2019 07:17 PM, Cédric Le Goater wrote:
>> BT responses are handled using a timer doing the polling. To hope to
>> get an answer to an IPMI synchronous message, the timer needs to run.
>>
> 
> timer is called from time_wait_ms() -> opal_run_pollers() -> chec_timer() right?

we are holding locks when accessing the flash from flash_load_resource().
so we are taking the nopoll() path AFAICT.

> 
>> This issue shows up very quickly under QEMU when loading the first
>> flash resource with the IPMI HIOMAP backend.
> 
> Is this during boot time ?

Yes. First load. 

>>
>> Adding a timeout would also help in reporting errors instead of
>> looping indefinitely waiting for a response.
>>
>> Signed-off-by: Cédric Le Goater <clg at kaod.org>
>> ---
>>   core/ipmi.c | 10 +++++++++-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/core/ipmi.c b/core/ipmi.c
>> index 2bf3f4dabe19..78b410fd1aea 100644
>> --- a/core/ipmi.c
>> +++ b/core/ipmi.c
>> @@ -182,8 +182,16 @@ void ipmi_queue_msg_sync(struct ipmi_msg *msg)
>>       ipmi_queue_msg_head(msg);
>>       unlock(&sync_lock);
>>
>> -    while (sync_msg == msg)
>> +    /*
>> +     * BT response handling relies on a timer. Run timers once in
>> +     * a while.
>> +     *
>> +     * TODO (clg): implement a timeout for IPMI synchronous messages
>> +     */
> 
> We have timeout for ipmi messages. Its handled in hw/bt.c (once we schedule message).

Yes but timers are not running in some cases (this one). If we were 
handling timeouts here, we could cleanly error out instead of looping 
forever.
 
Thanks,

C. 


> -Vasant
> 



More information about the Skiboot mailing list