[Skiboot] [PATCH V7 02/12] errorlog: Remove the elog enable check from 'fsp_elog_check_and_fetch_head'

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Wed Sep 7 20:21:16 AEST 2016


We use 'elog_enabled' flag to check whether host OS is ready to receive
error log or not. This is nothing to do with reading error log from
service processor.

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.

With this changes, in some corner cases we may endup reading same error
log twice from FSP. It happens 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>
Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
Changes in V7:
 - Patch description changed.
 - Subject tag changed from opal/errorlog to errorlog.

Changes in V6:
 - Rebased on master.

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;
-
 	lock(&elog_read_lock);
 	if (elog_read_from_fsp_head_state != ELOG_STATE_NONE ||
 			list_empty(&elog_read_pending)) {
-- 
2.7.4



More information about the Skiboot mailing list