summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2017-09-13 08:58:27 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-10-15 16:26:48 -0400
commita5d19110fd5dad891f8fe20c260fb7fb23051822 (patch)
treeeeeecdc372c8e6294fa74ed152e981b5c680fd20 /src/usr/hwas
parent54a809824656603dad56d67c8cab8946bfa43ecb (diff)
downloadtalos-hostboot-a5d19110fd5dad891f8fe20c260fb7fb23051822.tar.gz
talos-hostboot-a5d19110fd5dad891f8fe20c260fb7fb23051822.zip
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 <pfd-jenkins+hostboot@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: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas')
-rw-r--r--src/usr/hwas/common/deconfigGard.C37
-rw-r--r--src/usr/hwas/common/hwas.C10
-rw-r--r--src/usr/hwas/test/hwas1test.H11
3 files changed, 32 insertions, 26 deletions
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<Target &> (*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<ATTR_OPTICS_CONFIG_MODE>() !=
+ // 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<ATTR_OPTICS_CONFIG_MODE>() !=
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<ATTR_TYPE>() == TYPE_OBUS_BRICK)
{
- //If NPU is bad and Bricks are non-SMP, then mark them bad
- if ((i_desc->getAttr<ATTR_OPTICS_CONFIG_MODE>()
+ auto obusType = TARGETING::TYPE_OBUS;
+ TARGETING::Target* l_obus_ptr = const_cast<TARGETING::Target*>(
+ 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<ATTR_OPTICS_CONFIG_MODE>()
!= 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
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H
index 4b1e9ccd0..b11dcfad3 100644
--- a/src/usr/hwas/test/hwas1test.H
+++ b/src/usr/hwas/test/hwas1test.H
@@ -1652,14 +1652,19 @@ public:
case TYPE_OBUS_BRICK:
{
//Two cases here:
- //OBRICK==SMP --> Target should be present regardless of PG
- //OBRICK!=SMP --> Target should follow PG
+ //OBUS==SMP --> Target should be present regardless of PG
+ //OBUS!=SMP --> Target should follow PG
//marking PG bad
pgData[VPD_CP00_PG_N3_INDEX] |=
(uint16_t)VPD_CP00_PG_N3_NPU;
+ // get parent OBUS and check OPTICS_CONFIG_MODE
+ auto obusType = TARGETING::TYPE_OBUS;
+ TARGETING::Target* l_obus_ptr =
+ const_cast<TARGETING::Target*>(
+ getParent(pDesc, obusType));
ATTR_OPTICS_CONFIG_MODE_type config_mode =
- pDesc->getAttr<ATTR_OPTICS_CONFIG_MODE>();
+ l_obus_ptr->getAttr<ATTR_OPTICS_CONFIG_MODE>();
if (OPTICS_CONFIG_MODE_SMP == config_mode)
{
OpenPOWER on IntegriCloud