From ad517636c3d03b685abc57a5eb3a54ce22c8f2e8 Mon Sep 17 00:00:00 2001 From: Rick Ward Date: Thu, 29 Mar 2018 13:47:19 -0500 Subject: Verify deconfig-by-association assumptions still apply to CDIMM scenario. Corrected the deconfig code so that it will only deconfig a MBA if all of its DIMMs have been deconfig'd. Added a testcase to confirm the behavior. Change-Id: Iaf1111073c7229e3d3b72f17b9b905dd244ceb9a RTC: 176408 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56481 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Richard J. Knight Reviewed-by: Prachi Gupta Reviewed-by: SWATHI M. BHATTIPROLU Reviewed-by: William G. Hoffa --- src/usr/hwas/common/deconfigGard.C | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'src/usr/hwas/common/deconfigGard.C') diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C index 44493ae5f..2e0383b91 100644 --- a/src/usr/hwas/common/deconfigGard.C +++ b/src/usr/hwas/common/deconfigGard.C @@ -1806,12 +1806,30 @@ void DeconfigGard::_deconfigureByAssoc( if (!pParentMbaList.empty()) { const Target *l_parentMba = pParentMbaList[0]; - HWAS_INF("_deconfigureByAssoc DIMM parent MBA: %.8X", - get_huid(l_parentMba)); - _deconfigureTarget(const_cast (*l_parentMba), - i_errlEid, NULL, i_deconfigRule); - _deconfigureByAssoc(const_cast (*l_parentMba), - i_errlEid, i_deconfigRule); + + // get children DIMM that are functional + // NOTE cannot use anyChildFunctional to determine this + // because we need to look at affinity path + TargetHandleList pDimmList; + PredicateCTM predDimm(CLASS_LOGICAL_CARD, TYPE_DIMM); + PredicatePostfixExpr funcDimms; + funcDimms.push(&predDimm).push(&isFunctional).And(); + targetService().getAssociated(pDimmList, + l_parentMba, + TargetService::CHILD_BY_AFFINITY, + TargetService::ALL, + &funcDimms); + + // if parent MBA has no functional memory + if (pDimmList.empty()) + { + HWAS_INF("_deconfigureByAssoc DIMM parent MBA: %.8X", + get_huid(l_parentMba)); + _deconfigureTarget(const_cast (*l_parentMba), + i_errlEid, NULL, i_deconfigRule); + _deconfigureByAssoc(const_cast (*l_parentMba), + i_errlEid, i_deconfigRule); + } } TargetHandleList pParentMcaList; -- cgit v1.2.1