[Skiboot] [PATCH V3 3/6] opal/errorlog : Properly raising/clearing the event variable OPAL_EVENT_ERROR_LOG_AVAIL
Stewart Smith
stewart at linux.vnet.ibm.com
Thu Jun 30 19:05:38 AEST 2016
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.
> @@ -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.
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list