summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common/deconfigGard.C
diff options
context:
space:
mode:
authorAmit Tendolkar <amit.tendolkar@in.ibm.com>2018-06-05 05:17:14 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-06-18 15:40:03 -0400
commit8fcc6813c0987036205079e6db94257687b927a8 (patch)
tree2336e8d9331858dbbd59aaa89e81999c29b10687 /src/usr/hwas/common/deconfigGard.C
parent36d47d4ca26d23c67224cb370409e5f59f378c4b (diff)
downloadtalos-hostboot-8fcc6813c0987036205079e6db94257687b927a8.tar.gz
talos-hostboot-8fcc6813c0987036205079e6db94257687b927a8.zip
SW419349: Handle override of deconfig by Error vs FCO reasons by association
1. Override the deconfig reason of a parent .. a) getting deconfig by association due to error on its child && b) has at least 1 other child already deconfig by FCO .. to deconfig by FCO 2. Override the deconfig reason of a child .. c) whose parent is getting deconfig by an error && d) that is itself already deconfig by FCO .. to deconfig by that error Change-Id: I9c73fe35aedb832f9a4b33bd299bb30fe589095c CQ: SW419349 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59934 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/common/deconfigGard.C')
-rw-r--r--src/usr/hwas/common/deconfigGard.C114
1 files changed, 87 insertions, 27 deletions
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index 5ccbe2040..1cdbb3637 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -1523,12 +1523,21 @@ void DeconfigGard::_deconfigureByAssoc(
isFunctional.specdeconfig(false);
}
+ // If there are child targets deconfig by FCO, override the reason
+ // with that of the parent's deconfg EID
+ PredicateHwas isFCO;
+ isFCO.present(true).functional(false)
+ .deconfiguredByEid(DECONFIGURED_BY_FIELD_CORE_OVERRIDE);
+
+ PredicatePostfixExpr funcOrFco;
+ funcOrFco.push(&isFunctional).push(&isFCO).Or();
+
// note - ATTR_DECONFIG_GARDABLE is NOT checked for all 'by association'
// deconfigures, as that attribute is only for direct deconfigure requests.
// find all CHILD targets and deconfigure them
targetService().getAssociated(pChildList, &i_target,
- TargetService::CHILD, TargetService::ALL, &isFunctional);
+ TargetService::CHILD, TargetService::ALL, &funcOrFco);
for (TargetHandleList::iterator pChild_it = pChildList.begin();
pChild_it != pChildList.end();
++pChild_it)
@@ -1555,7 +1564,7 @@ void DeconfigGard::_deconfigureByAssoc(
// find all CHILD_BY_AFFINITY targets and deconfigure them
targetService().getAssociated(pChildList, &i_target,
TargetService::CHILD_BY_AFFINITY, TargetService::ALL,
- &isFunctional);
+ &funcOrFco);
for (TargetHandleList::iterator pChild_it = pChildList.begin();
pChild_it != pChildList.end();
++pChild_it)
@@ -1613,11 +1622,23 @@ void DeconfigGard::_deconfigureByAssoc(
// if both cores of EX non-functional, de-config EX
else if (!anyChildFunctional(*l_parentEX))
{
+ uint32_t l_errlEidOverride = i_errlEid;
+
+ // If any sibling is not functional due to FCO, override
+ // the deconfig by Eid reason of its parent to FCO
+ if (anyChildFCO(*l_parentEX))
+ {
+ HWAS_INF("Override EX %.8X deconfigByEid %.8X->FCO",
+ get_huid(l_parentEX), i_errlEid);
+ l_errlEidOverride =
+ DECONFIGURED_BY_FIELD_CORE_OVERRIDE;
+ }
+
// If parent is functional, deconfigure it
_deconfigureTarget(*l_parentEX,
- i_errlEid, NULL, i_deconfigRule);
+ l_errlEidOverride, NULL, i_deconfigRule);
_deconfigureByAssoc(*l_parentEX,
- i_errlEid,i_deconfigRule);
+ l_errlEidOverride, i_deconfigRule);
} // is_fused
} // isFunctional
break;
@@ -1641,7 +1662,19 @@ void DeconfigGard::_deconfigureByAssoc(
if (!anyChildFunctional(*l_targetEq))
{
- _deconfigureTarget(*l_targetEq, i_errlEid, NULL,
+ uint32_t l_errlEidOverride = i_errlEid;
+
+ // If any sibling is not functional due to FCO, override
+ // the deconfig by Eid reason of its parent to FCO
+ if (anyChildFCO(*l_targetEq))
+ {
+ HWAS_INF("Override EQ %.8X deconfigByEid %.8X->FCO",
+ get_huid(l_targetEq), i_errlEid);
+ l_errlEidOverride =
+ DECONFIGURED_BY_FIELD_CORE_OVERRIDE;
+ }
+
+ _deconfigureTarget(*l_targetEq, l_errlEidOverride, NULL,
i_deconfigRule);
}
@@ -2088,6 +2121,16 @@ void DeconfigGard::_deconfigureTarget(
// state changed, so do the setAttr
i_target.setAttr<ATTR_HWAS_STATE>(l_state);
}
+
+ if (l_state.deconfiguredByEid == DECONFIGURED_BY_FIELD_CORE_OVERRIDE)
+ {
+ // A child target was deconfig by FCO, and parent is being deconfig
+ // with a non-FCO reason .. override with parent's EID
+ HWAS_INF("HUID %.8X, Overriding deconfigByEid from FCO->%.8X",
+ get_huid(&i_target), i_errlEid);
+ l_state.deconfiguredByEid = i_errlEid;
+ i_target.setAttr<ATTR_HWAS_STATE>(l_state);
+ }
}
else
{
@@ -2875,33 +2918,50 @@ void DeconfigGard::_clearFCODeconfigure(ConstTargetHandle_t i_nodeTarget)
bool DeconfigGard::anyChildFunctional(Target & i_parent)
{
bool retVal = false;
- do
+ TargetHandleList pChildList;
+ PredicateHwas isFunctional;
+ isFunctional.functional(true);
+
+ if (isFunctional(&i_parent))
{
- TargetHandleList pChildList;
- PredicateHwas isFunctional;
- isFunctional.functional(true);
- if (isFunctional(&i_parent))
- {
- // find all CHILD targets
- // if any of them are functional return true
- // if all of them are non-functional return false
- targetService().getAssociated(pChildList, &i_parent,
- TargetService::CHILD, TargetService::ALL, &isFunctional);
- for (TargetHandleList::iterator pChild_it = pChildList.begin();
- pChild_it != pChildList.end();
- ++pChild_it)
- {
- if (isFunctional(*pChild_it))
- {
- retVal = true;
- break;
- }
- }
+ // find all CHILD targets, that match the predicate
+ // if any of them are functional return true
+ // if all of them are non-functional return false
+ targetService().getAssociated(pChildList, &i_parent,
+ TargetService::CHILD, TargetService::ALL, &isFunctional);
+
+ if (pChildList.size() >= 1)
+ {
+ retVal = true;
}
- }while(0);
+ }
return retVal;
} //anyChildFunctional
+bool DeconfigGard::anyChildFCO (Target & i_parent)
+{
+ bool retVal = false;
+
+ TargetHandleList pChildList;
+ PredicateHwas predFCO;
+ predFCO.present(true)
+ .functional(false)
+ .deconfiguredByEid(DECONFIGURED_BY_FIELD_CORE_OVERRIDE);
+
+ // find all CHILD targets, that match the predicate
+ // if any of them are FCO return true
+ // if none of them are FCO return false
+ targetService().getAssociated(pChildList, &i_parent,
+ TargetService::CHILD, TargetService::ALL, &predFCO);
+
+ if (pChildList.size() >= 1)
+ {
+ retVal = true;
+ }
+
+ return retVal;
+} //anyChildFCO
+
#ifdef __HOSTBOOT_MODULE
/******************************************************************************/
// deconfigureTargetAtRuntime
OpenPOWER on IntegriCloud