[Skiboot] [PATCH V6 09/12] Removes the usage of 'elog_init()' routine, replaces it with 'opal_elog_init()'

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Thu Sep 1 05:39:13 AEST 2016


Let us have a single routine 'opal_elog_init()' which initialises the
error log infrastructure. As part of the movement, better to move the
content of the 'elog_init()' to 'opal_elog_init()' and remove 'elog_init()'
routine.

Signed-off-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
---
Changes in V6:
 - Rebased on master.

Changes in V5:
 - New patch.

 core/errorlog.c           | 18 ++++++------------
 include/errorlog.h        |  1 -
 platforms/astbmc/common.c |  6 ++++--
 3 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/core/errorlog.c b/core/errorlog.c
index 30cfaa7..efa6a92 100644
--- a/core/errorlog.c
+++ b/core/errorlog.c
@@ -473,17 +473,6 @@ static bool opal_kexec_elog_notify(void *data __unused)
 	return true;
 }
 
-int elog_init(void)
-{
-	/* Pre-allocate memory for records */
-	if (pool_init(&elog_pool, sizeof(struct errorlog),
-					ELOG_WRITE_MAX_RECORD, 1))
-		return OPAL_RESOURCE;
-
-	elog_available = true;
-	return 0;
-}
-
 void opal_elog_init(void)
 {
 	elog_write_to_host_buffer = memalign(TCE_PSIZE,
@@ -499,5 +488,10 @@ void opal_elog_init(void)
 	opal_register(OPAL_ELOG_RESEND, opal_resend_pending_logs, 0);
 	opal_register(OPAL_ELOG_SIZE, opal_elog_info, 3);
 
-	elog_init();
+        /* Pre-allocate memory for records */
+        if (pool_init(&elog_pool, sizeof(struct errorlog),
+                                        ELOG_WRITE_MAX_RECORD, 1))
+                return;
+
+        elog_available = true;
 }
diff --git a/include/errorlog.h b/include/errorlog.h
index fa9d4a1..46a9aa7 100644
--- a/include/errorlog.h
+++ b/include/errorlog.h
@@ -375,7 +375,6 @@ void log_commit(struct errorlog *elog);
 void opal_elog_complete(struct errorlog *elog, bool success);
 void opal_elog_init(void);
 
-int elog_init(void);
 void elog_append_write_to_host(struct errorlog *buf);
 void elog_set_head_state(bool opal_logs, enum elog_head_state state);
 
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c
index e1a8a4d..0dfed45 100644
--- a/platforms/astbmc/common.c
+++ b/platforms/astbmc/common.c
@@ -120,8 +120,10 @@ void astbmc_init(void)
 
 	/* Register the BT interface with the IPMI layer */
 	bt_init();
-	/* Initialize elog */
-	elog_init();
+
+	/* Initialize error log */
+	opal_elog_init();
+
 	ipmi_sel_init();
 	ipmi_wdt_init();
 	ipmi_rtc_init();
-- 
2.7.4



More information about the Skiboot mailing list