summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/errl/errlmanager.H5
-rw-r--r--src/usr/errl/errlmanager.C28
2 files changed, 33 insertions, 0 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index 5bd2aa196..586c21cee 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -478,6 +478,11 @@ private:
bool iv_pnorReadyForErrorLogs;
/**
+ * @brief Indicates if we have processed a shutdown event message
+ */
+ bool iv_recvdShutdownEvent;
+
+ /**
* @brief
* Pointer to the header that precedes the error log storage buffer
* in L3 RAM. This may go away when we adopt PNOR, or else become
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index 97310383f..05890dad7 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -138,6 +138,7 @@ AtLoadFunctions atLoadFunction;
///////////////////////////////////////////////////////////////////////////////
ErrlManager::ErrlManager() :
iv_pnorReadyForErrorLogs(false),
+ iv_recvdShutdownEvent(false),
iv_hwasProcessCalloutFn(NULL),
iv_msgQ(NULL),
iv_pnorAddr(NULL),
@@ -290,6 +291,30 @@ void ErrlManager::errlogMsgHndlr ()
msg_t * theMsg = msg_wait( iv_msgQ );
TRACFCOMP( g_trac_errl, INFO_MRK"Got an error log Msg - Type: 0x%08x",
theMsg->type );
+
+ // if we've been shut down then do nothing except delete the msg or send
+ // a response depending on the message type.
+ if(iv_recvdShutdownEvent)
+ {
+ TRACFCOMP( g_trac_errl, INFO_MRK "Error log service is shutdown. "
+ "Message will be ignored.");
+ switch( theMsg->type )
+ {
+ // Shutdown and flush message types expect a response
+ case ERRLOG_SHUTDOWN_TYPE:
+ case ERRLOG_FLUSH_TYPE:
+ msg_respond ( iv_msgQ, theMsg );
+ break;
+
+ // All other messages just need to be freed
+ default:
+ msg_free(theMsg);
+ break;
+ }
+ // wait for next message
+ continue;
+ }
+
//Process message just received
switch( theMsg->type )
{
@@ -1029,6 +1054,9 @@ void ErrlManager::errlogShutdown()
// prior to the PNOR resource provider shutting down.
PNOR::flush(PNOR::HB_ERRLOGS);
+ // Remember that we have recieved the shutdown event
+ iv_recvdShutdownEvent = true;
+
return;
}
OpenPOWER on IntegriCloud