summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt/htmgt_occ.C
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2015-09-04 10:18:52 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-09-18 20:37:54 -0500
commit978b2c75e301281fe4882dd30a2e365e6106faa4 (patch)
tree8897560408b39ba7418ebe775ebafd2037b49e83 /src/usr/htmgt/htmgt_occ.C
parentef63b1a277b8ad231b308c0c197d663bd4b0eb13 (diff)
downloadblackbird-hostboot-978b2c75e301281fe4882dd30a2e365e6106faa4.tar.gz
blackbird-hostboot-978b2c75e301281fe4882dd30a2e365e6106faa4.zip
Prevent OCC exception from logging duplicate errors
Change-Id: I3262c42c906fc9cfa879e7df0e501e2f7fe1e2f3 CQ:SW320752 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20578 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: SHELDON R. BAILEY <baileysh@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt_occ.C')
-rw-r--r--src/usr/htmgt/htmgt_occ.C63
1 files changed, 60 insertions, 3 deletions
diff --git a/src/usr/htmgt/htmgt_occ.C b/src/usr/htmgt/htmgt_occ.C
index 52a27c14b..e23c0360f 100644
--- a/src/usr/htmgt/htmgt_occ.C
+++ b/src/usr/htmgt/htmgt_occ.C
@@ -63,6 +63,8 @@ namespace HTMGT
iv_target(i_target),
iv_lastPollValid(false),
iv_occsPresent(1 << i_instance),
+ iv_resetReason(OCC_RESET_REASON_NONE),
+ iv_exceptionLogged(0),
iv_resetCount(0),
iv_version(0x01)
{
@@ -235,6 +237,7 @@ namespace HTMGT
iv_failed = false;
iv_lastPollValid = false;
iv_resetReason = OCC_RESET_REASON_NONE;
+ iv_exceptionLogged = 0;
}
@@ -622,6 +625,7 @@ namespace HTMGT
{
TMGT_INF("_setOccState: All OCCs have reached state "
"0x%02X", requestedState);
+ iv_state = requestedState;
if (OCC_STATE_ACTIVE == requestedState)
{
@@ -769,13 +773,15 @@ namespace HTMGT
* @errortype
* @moduleid HTMGT_MOD_OCC_RESET
* @reasoncode HTMGT_RC_OCC_RESET_THREHOLD
+ * @userdata1 return code triggering safe mode
+ * @userdata2 OCC instance
* @devdesc OCC reset threshold reached.
* Leaving OCCs in reset state
*/
bldErrLog(err,
HTMGT_MOD_OCC_RESET,
HTMGT_RC_OCC_CRIT_FAILURE,
- 0, 0, 0, 0,
+ 0, cv_safeReturnCode, 0, cv_safeOccInstance,
ERRORLOG::ERRL_SEV_UNRECOVERABLE);
}
@@ -910,6 +916,13 @@ namespace HTMGT
}
+ uint32_t OccManager::_getSafeModeReason(uint32_t & o_instance)
+ {
+ o_instance = cv_safeOccInstance;
+ return cv_safeReturnCode;
+ }
+
+
bool OccManager::_occNeedsReset()
{
bool needsReset = false;
@@ -1039,6 +1052,40 @@ namespace HTMGT
return err;
}
+ // Consolidate all OCC states
+ void OccManager::_syncOccStates()
+ {
+ occStateId currentState = OCC_STATE_NO_CHANGE;
+
+ for(occList_t::const_iterator occ_itr = iv_occArray.begin();
+ (occ_itr != iv_occArray.end());
+ ++occ_itr)
+ {
+ Occ * occ = *occ_itr;
+ if (OCC_STATE_NO_CHANGE == currentState)
+ {
+ currentState = occ->getState();
+ }
+ else
+ {
+ if (currentState != occ->getState())
+ {
+ // States do not match yet...
+ currentState = OCC_STATE_NO_CHANGE;
+ break;
+ }
+ }
+ }
+ if (OCC_STATE_NO_CHANGE != currentState)
+ {
+ if (iv_state != currentState)
+ {
+ TMGT_INF("syncOccStates: All OCCs are in 0x%02X", currentState);
+ iv_state = currentState;
+ }
+ }
+ }
+
uint8_t OccManager::getNumOccs()
{
@@ -1084,16 +1131,22 @@ namespace HTMGT
void OccManager::waitForOccCheckpoint()
{
- return Singleton<OccManager>::instance()._waitForOccCheckpoint();
+ Singleton<OccManager>::instance()._waitForOccCheckpoint();
}
void OccManager::updateSafeModeReason(uint32_t i_src,
uint32_t i_instance)
{
- return Singleton<OccManager>::instance().
+ Singleton<OccManager>::instance().
_updateSafeModeReason(i_src, i_instance);
}
+ uint32_t OccManager::getSafeModeReason(uint32_t & o_instance)
+ {
+ return Singleton<OccManager>::instance().
+ _getSafeModeReason(o_instance);
+ }
+
bool OccManager::occNeedsReset()
{
return Singleton<OccManager>::instance()._occNeedsReset();
@@ -1124,6 +1177,10 @@ namespace HTMGT
Singleton<OccManager>::instance()._setPstateTable(i_useNormal);
}
+ void OccManager::syncOccStates()
+ {
+ Singleton<OccManager>::instance()._syncOccStates();
+ }
} // end namespace
OpenPOWER on IntegriCloud