summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common/deconfigGard.C
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-05-04 11:42:10 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-05-23 14:04:43 -0400
commit7ab9a90ab7fdf2a336ef327379001133d52d64ba (patch)
tree153000ab6c75cc8ce179c075efe14092bada1f6e /src/usr/hwas/common/deconfigGard.C
parent6d153811271a104cd4471633e19d8b51c664fe5d (diff)
downloadtalos-hostboot-7ab9a90ab7fdf2a336ef327379001133d52d64ba.tar.gz
talos-hostboot-7ab9a90ab7fdf2a336ef327379001133d52d64ba.zip
deconfing/gard of OBUS_BRICK/NPU targets
Change-Id: I1388859a81ba8b2e040f6d136eafcf50f1f138ba RTC:173738 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40218 Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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.C52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index b9b1fbf04..6f1925b9c 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -1951,6 +1951,58 @@ void DeconfigGard::_deconfigureByAssoc(
break;
} // TYPE_PHB
+ case TYPE_OBUS_BRICK:
+ {
+ TargetHandleList pParentObusList;
+ getParentAffinityTargetsByState(pParentObusList, &i_target,
+ CLASS_UNIT, TYPE_OBUS, UTIL_FILTER_PRESENT);
+ HWAS_ASSERT((pParentObusList.size() == 1),
+ "HWAS _deconfigureByAssoc: pParentObusList != 1");
+
+ Target *l_parentObus = pParentObusList[0];
+ if ((isFunctional(l_parentObus)) &&
+ (!anyChildFunctional(*l_parentObus)))
+ {
+ _deconfigureTarget(*l_parentObus,
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(*l_parentObus,
+ i_errlEid,i_deconfigRule);
+ }
+
+ break;
+ } // TYPE_OBUS_BRICK
+ case TYPE_NPU:
+ {
+ //Get the parent proc associated with this npu
+ auto l_proc = getParentChip(&i_target);
+
+ //Get all the obus brick children associated with this proc
+ PredicateCTM l_obrickFilter (CLASS_UNIT, TYPE_OBUS_BRICK);
+ PredicateHwas l_predPres;
+ l_predPres.present(true);
+ PredicatePostfixExpr l_presentObricks;
+ l_presentObricks.push(&l_obrickFilter).push(&l_predPres).And();
+
+ TargetHandleList l_obrickList;
+ targetService().getAssociated(l_obrickList, l_proc,
+ TargetService::CHILD_BY_AFFINITY,
+ TargetService::ALL, &l_presentObricks);
+
+ for (auto l_obrick : l_obrickList)
+ {
+ //deconfigure each obrick that is non-smp
+ if (l_obrick->getAttr<ATTR_OPTICS_CONFIG_MODE>() !=
+ OPTICS_CONFIG_MODE_SMP)
+ {
+ _deconfigureTarget(*l_obrick,
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(*l_obrick,
+ i_errlEid,i_deconfigRule);
+ }
+ }
+
+ break;
+ } // TYPE_NPU
default:
// no action
break;
OpenPOWER on IntegriCloud