@@ -477,17 +477,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,
@@ -503,5 +492,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;
}
@@ -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);
@@ -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();