summaryrefslogtreecommitdiffstats
path: root/hw/fsp/fsp-elog-write.c
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2016-07-02 21:03:42 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-21 16:36:20 +1000
commite7c8cba4ad773055f390632c2996d3242b633bf4 (patch)
treed799b64dd96f62b4dc089385f92d7173c96541ae /hw/fsp/fsp-elog-write.c
parent1fb10de164d3ca034193df81c1f5d007aec37781 (diff)
downloadtalos-skiboot-e7c8cba4ad773055f390632c2996d3242b633bf4.tar.gz
talos-skiboot-e7c8cba4ad773055f390632c2996d3242b633bf4.zip
FSP/ELOG: Fix possible event notifier hangs
In some corner cases host may send acknowledgement without reading actual data (fsp_opal_elog_info -> fsp_opal_elog_ack). Because of this elog_read_from_fsp_head_state may be stuck in wrong state (ELOG_STATE_HOST_INFO) and not able to send remaining ELOG's to host. Hence reset ELOG state and start sending remaining ELOG's. Also in normal case we will ACK the logs which are already processed (elog_read_processed). Hence rearrange the code such that we go through elog_read_processed first. Finally return OPAL_PARAMETER if we are not able to find ELOG ID. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: spelling fix] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp-elog-write.c')
-rw-r--r--hw/fsp/fsp-elog-write.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index 80a0a395..b78bc202 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -248,6 +248,9 @@ bool opal_elog_ack(uint64_t ack_id)
list_del(&record->link);
opal_elog_complete(record, true);
rc = true;
+ unlock(&elog_write_to_host_lock);
+ opal_commit_elog_in_host();
+ return rc;
}
}
unlock(&elog_write_to_host_lock);
OpenPOWER on IntegriCloud