[Skiboot] [PATCH V3 3/6] opal/errorlog : Properly raising/clearing the event variable OPAL_EVENT_ERROR_LOG_AVAIL

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Mon Jul 11 15:20:35 AEST 2016


Stewart,

On Thursday 30 June 2016 02:35 PM, Stewart Smith wrote:
> Mukesh Ojha<mukesh02 at linux.vnet.ibm.com>  writes:
>> --- a/include/errorlog.h
>> +++ b/include/errorlog.h
>> @@ -22,6 +22,19 @@
>>   #include <stdint.h>
>>   #include <ccan/list/list.h>
>>   
>> +/* Following variables are used to indicate state of the
>> + * head log entry which is being fetched from FSP/OPAL and
>> + * these variables are not overwritten until next log is
>> + * retrieved from FSP/OPAL.
>> + */
>> +enum elog_head_state {
>> +	ELOG_STATE_FETCHING,    /*In the process of reading log from FSP. */
>> +	ELOG_STATE_FETCHED_INFO,/* Indicates reading log info is completed */
>> +	ELOG_STATE_FETCHED_DATA,/* Indicates reading log is completed */
>> +	ELOG_STATE_NONE,        /* Indicates to fetch next log */
>> +	ELOG_STATE_REJECTED,    /* resend all pending logs to linux */
>> +};
> Cranking a state machine for what the FSP requires shouldn't leak into
> platform independent code.

As this state machine used by both for the FSP and opal errorlog,
It would be good, if we add it in

include/errorlog.h


>> @@ -358,6 +371,8 @@ void log_commit(struct errorlog *elog);
>>   void opal_elog_complete(struct errorlog *elog, bool success);
>>   
>>   void opal_elog_init(void);
>> +void elog_set_head_state(bool platform_log, enum elog_head_state old_state,
>> +		enum elog_head_state new_state);
> This doesn't look obvious as to what it does.
>
This function is to properly clearing and raising the event variable.
Vasant has also included this routine and modified it to give his fix 
for the errorlog.
I have to rebase my change, once his patch gets in.

-Mukesh



More information about the Skiboot mailing list