aboutsummaryrefslogtreecommitdiff
path: root/hw/fsp/fsp-elog-write.c
diff options
context:
space:
mode:
authorDeepthi Dharwar <deepthi@linux.vnet.ibm.com>2014-07-24 12:02:27 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-25 14:10:52 +1000
commit97faf5b43a139228c75ae92a5e833cb93c7d88d6 (patch)
treeeab784151c72c8bb9e051d6823c5711098d57b55 /hw/fsp/fsp-elog-write.c
parent566cb50023f37ad6f5dff778807ca891fc4409eb (diff)
downloadskiboot-97faf5b43a139228c75ae92a5e833cb93c7d88d6.zip
skiboot-97faf5b43a139228c75ae92a5e833cb93c7d88d6.tar.gz
skiboot-97faf5b43a139228c75ae92a5e833cb93c7d88d6.tar.bz2
elog: Support for re-sending Sapphire pending logs.
This patch adds support to re-send Sapphire logs to the host. Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/fsp/fsp-elog-write.c')
-rw-r--r--hw/fsp/fsp-elog-write.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index 87342a8..686e24a 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -351,6 +351,26 @@ bool opal_elog_ack(uint64_t ack_id)
return rc;
}
+void opal_resend_pending_logs(void)
+{
+ struct opal_errorlog *record;
+
+ lock(&elog_write_to_host_lock);
+ if (list_empty(&elog_write_to_host_processed)) {
+ unlock(&elog_write_to_host_lock);
+ return;
+ }
+
+ while (!list_empty(&elog_write_to_host_processed)) {
+ record = list_pop(&elog_write_to_host_processed,
+ struct opal_errorlog, link);
+ list_add_tail(&elog_write_to_host_pending, &record->link);
+ }
+ elog_write_to_host_head_state = ELOG_STATE_NONE;
+ unlock(&elog_write_to_host_lock);
+ opal_commit_elog_in_host();
+}
+
static int opal_send_elog_to_fsp(void)
{
struct opal_errorlog *head;