[Skiboot] [PATCH 4/4] ELOG: Remove redundant elog state

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Jun 24 20:39:31 AEST 2016


OPAL gets elog notification from service processor which contains log
information. Once we get notification we start reading log data and
change elog state to ELOG_STATE_FETCHING.

Hence we don't need ELOG_STATE_FETCHED_INFO state. Lets remove this
variable.

Also in some places we have used this state after sending event information
to host. Replace such usage with better state (ELOG_STATE_HOST_INFO).

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/fsp/fsp-elog-write.c |    4 ++--
 include/fsp-elog.h      |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index cf915a2..9b76a09 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -143,7 +143,7 @@ bool opal_elog_info(uint64_t *opal_elog_id, uint64_t *opal_elog_size)
 		} else {
 			*opal_elog_id = head->plid;
 			*opal_elog_size = head->log_size;
-			elog_write_to_host_head_state = ELOG_STATE_FETCHED_INFO;
+			elog_write_to_host_head_state = ELOG_STATE_HOST_INFO;
 			rc = true;
 		}
 	}
@@ -179,7 +179,7 @@ bool opal_elog_read(uint64_t *buffer, uint64_t opal_elog_size,
 	bool rc = false;
 
 	lock(&elog_write_to_host_lock);
-	if (elog_write_to_host_head_state == ELOG_STATE_FETCHED_INFO) {
+	if (elog_write_to_host_head_state == ELOG_STATE_HOST_INFO) {
 		log_data = list_top(&elog_write_to_host_pending,
 					struct errorlog, link);
 		if (!log_data) {
diff --git a/include/fsp-elog.h b/include/fsp-elog.h
index f1c49a5..f79589a 100644
--- a/include/fsp-elog.h
+++ b/include/fsp-elog.h
@@ -29,7 +29,6 @@
  */
 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_HOST_INFO,	/* Host read log info */
 	ELOG_STATE_NONE,        /* Indicates to fetch next log */



More information about the Skiboot mailing list