[Skiboot] [PATCH V5 02/10] Removes the elog_enabled variable check from 'fsp_elog_check_and_fetch_head' routine

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Sun Aug 21 18:47:20 AEST 2016

This patch is to remove the check and keep this 'elog_enabled'
free from FSP specific code and move it into core/errorlog.c
in later upcoming patches.

If we remove this check we end up reading the same error log twice. It
happen as we call 'elog_reject_head' inside 'fsp_opal_resend_pending_logs'
which makes the state either 'ELOG_STATE_REJECTED' or 'ELOG_STATE_NONE'.
So, a call to 'fsp_elog_check_and_fetch_head' routine ends up reading
the error log from FSP which was already read. This case happens twice
in a reboot as whenever 'fsp_opal_resend_pending_logs' gets called. So,
we can ignore it.

Signed-off-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
Changes in V5:
 - New patch.

 hw/fsp/fsp-elog-read.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
index 351b3bd..ec5316e 100644
--- a/hw/fsp/fsp-elog-read.c
+++ b/hw/fsp/fsp-elog-read.c
@@ -127,9 +127,6 @@ static int64_t fsp_send_elog_ack(uint32_t log_id)
 /* Retrieve error log from FSP with TCE for the data transfer. */
 static void fsp_elog_check_and_fetch_head(void)
-	if (!elog_enabled)
-		return;
 	if (elog_read_from_fsp_head_state != ELOG_STATE_NONE ||
 			list_empty(&elog_read_pending)) {

More information about the Skiboot mailing list