aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2016-07-02 21:08:01 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-26 18:39:27 +1000
commit50745d87972bfbf858e382c80920766356564ad0 (patch)
tree7548b764490f270b5ac61fdfdbad6a6a22366922 /hw
parent7185dbc41abc43d42f38117cfde2cb1fb1400a1d (diff)
downloadskiboot-50745d87972bfbf858e382c80920766356564ad0.zip
skiboot-50745d87972bfbf858e382c80920766356564ad0.tar.gz
skiboot-50745d87972bfbf858e382c80920766356564ad0.tar.bz2
FSP/ELOG: Fix elog timeout issue
Presently we set timeout value as soon as we add elog to queue. If we have multiple elogs to write, it doesn't consider queue wait time. Instead set timeout value when we are actually sending elog to FSP. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp-elog-write.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index d4edc50..175b547 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -272,6 +272,11 @@ void opal_resend_pending_logs(void)
opal_commit_elog_in_host();
}
+static inline u64 get_elog_timeout(void)
+{
+ return (mftb() + secs_to_tb(ERRORLOG_TIMEOUT_INTERVAL));
+}
+
static int opal_send_elog_to_fsp(void)
{
struct errorlog *head;
@@ -285,6 +290,9 @@ static int opal_send_elog_to_fsp(void)
if (!list_empty(&elog_write_to_fsp_pending)) {
head = list_top(&elog_write_to_fsp_pending,
struct errorlog, link);
+ /* Error needs to be committed, update the time out value */
+ head->elog_timeout = get_elog_timeout();
+
elog_plid_fsp_commit = head->plid;
head->log_size = create_pel_log(head,
(char *)elog_write_to_fsp_buffer,
@@ -304,6 +312,10 @@ static int opal_push_logs_sync_to_fsp(struct errorlog *buf)
int rc = OPAL_SUCCESS;
lock(&elog_panic_write_lock);
+
+ /* Error needs to be committed, update the time out value */
+ buf->elog_timeout = get_elog_timeout();
+
opal_elog_size = create_pel_log(buf,
(char *)elog_panic_write_buffer,
ELOG_PANIC_WRITE_BUFFER_SIZE);
@@ -334,18 +346,10 @@ static int opal_push_logs_sync_to_fsp(struct errorlog *buf)
return rc;
}
-static inline u64 get_elog_timeout(void)
-{
- return (mftb() + secs_to_tb(ERRORLOG_TIMEOUT_INTERVAL));
-}
-
int elog_fsp_commit(struct errorlog *buf)
{
int rc = OPAL_SUCCESS;
- /* Error needs to be committed, update the time out value */
- buf->elog_timeout = get_elog_timeout();
-
if (buf->event_severity == OPAL_ERROR_PANIC) {
rc = opal_push_logs_sync_to_fsp(buf);
return rc;