From a5d19110fd5dad891f8fe20c260fb7fb23051822 Mon Sep 17 00:00:00 2001 From: Matt Derksen Date: Wed, 13 Sep 2017 08:58:27 -0500 Subject: Fix parent of OBUS_BRICK - remove OPTICS_CONFIG_MODE from obus brick targets - remove FAPI_POS from cumulus obus bricks Change-Id: I7248bcf39526378fa5b8322a331beeeb33d4d2a4 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46141 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes Reviewed-by: Prachi Gupta Reviewed-by: Daniel M. Crowell --- src/usr/hwas/common/deconfigGard.C | 37 +++++++++++++++++-------------------- src/usr/hwas/common/hwas.C | 10 +++++++--- 2 files changed, 24 insertions(+), 23 deletions(-) (limited to 'src/usr/hwas/common') diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C index a781f460a..d1afdda9f 100644 --- a/src/usr/hwas/common/deconfigGard.C +++ b/src/usr/hwas/common/deconfigGard.C @@ -1651,7 +1651,7 @@ void DeconfigGard::_deconfigureByAssoc( // and we're done, so break; break; } - + case TYPE_MI: { // get parent MC @@ -1685,7 +1685,7 @@ void DeconfigGard::_deconfigureByAssoc( // and we're done, so break; break; } - + case TYPE_DMI: { // get parent MI @@ -1747,8 +1747,8 @@ void DeconfigGard::_deconfigureByAssoc( _deconfigureByAssoc(const_cast (*l_parentMembuf), i_errlEid, i_deconfigRule); } - - // and we're done, so break; + + // and we're done, so break; break; } // TYPE_MBA @@ -1959,27 +1959,24 @@ void DeconfigGard::_deconfigureByAssoc( //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); + //Get all the obus children associated with this proc + TargetHandleList pChildObusList; + getChildAffinityTargetsByState(pChildObusList, l_proc, + CLASS_UNIT, TYPE_OBUS, UTIL_FILTER_PRESENT); - for (auto l_obrick : l_obrickList) + for (auto l_obus : pChildObusList) { - //deconfigure each obrick that is non-smp - if (l_obrick->getAttr() != + // NPU controls non-smp obus, + // so need to mark the non-smp ones as not functional + // when the NPU is bad + + //deconfigure each obus that is non-smp + if (l_obus->getAttr() != OPTICS_CONFIG_MODE_SMP) { - _deconfigureTarget(*l_obrick, + _deconfigureTarget(*l_obus, i_errlEid, NULL, i_deconfigRule); - _deconfigureByAssoc(*l_obrick, + _deconfigureByAssoc(*l_obus, i_errlEid,i_deconfigRule); } } diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index c2636baf7..c8af71942 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -1066,8 +1066,13 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, else if (i_desc->getAttr() == TYPE_OBUS_BRICK) { - //If NPU is bad and Bricks are non-SMP, then mark them bad - if ((i_desc->getAttr() + auto obusType = TARGETING::TYPE_OBUS; + TARGETING::Target* l_obus_ptr = const_cast( + getParent(i_desc, obusType)); + + //If NPU is bad and OBUS is non-SMP, then mark them bad + // Bit does not matter unless not in SMP mode + if ((l_obus_ptr->getAttr() != OPTICS_CONFIG_MODE_SMP) && ((i_pgData[VPD_CP00_PG_N3_INDEX] & VPD_CP00_PG_N3_NPU) != 0)) { @@ -1079,7 +1084,6 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, (i_pgData[VPD_CP00_PG_N3_INDEX] & ~VPD_CP00_PG_N3_NPU)); l_descFunctional = false; - } } else -- cgit v1.2.1