Skip to content

Commit

Permalink
deconfigByAssoc updates for Axone and OMCB
Browse files Browse the repository at this point in the history
Updates the deconfigByAssoc functions to use the special OMIC_PARENT and
OMI_CHILD relations when dealing with target hierarchy since OMIs have
two parents.

Change-Id: Ibc512777982e24de21ab7878d816a72fab1b19f7
RTC:196804
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70510
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-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>
  • Loading branch information
Matt Raybuck authored and dcrowell77 committed Jan 23, 2019
1 parent 720ee62 commit 443a53b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/usr/hwas/common/deconfigGard.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include <targeting/common/commontargeting.H>
#include <targeting/common/utilFilter.H>
#include <targeting/common/targetservice.H>

#ifdef __HOSTBOOT_MODULE
#include <config.h>
Expand Down Expand Up @@ -1611,6 +1612,7 @@ void DeconfigGard::_deconfigAffinityParent( TARGETING::Target & i_child,
PredicateIsFunctional isFunctional;

l_parent = getImmediateParentByAffinity(&i_child);

if ((l_parent != NULL) && isFunctional(l_parent))
{
// Now check if parent has any functional affinity children
Expand Down Expand Up @@ -1690,6 +1692,17 @@ void DeconfigGard::_deconfigureByAssoc(
// find all CHILD targets and deconfigure them
targetService().getAssociated(pChildList, &i_target,
TargetService::CHILD, TargetService::ALL, &funcOrFco);

// Since OMICs and OMIs share special relations OMI_CHILD and OMIC_PARENT,
// they will only show up if those relations are used and not the regular
// CHILD and PARENT relations.
if (i_target.getAttr<ATTR_TYPE>() == TYPE_OMIC)
{
// Append OMI targets to the child list.
getChildOmiTargetsByState(pChildList, &i_target, CLASS_NA,
TYPE_OMI, UTIL_FILTER_FUNCTIONAL);
}

for (TargetHandleList::iterator pChild_it = pChildList.begin();
pChild_it != pChildList.end();
++pChild_it)
Expand Down Expand Up @@ -2026,6 +2039,26 @@ void DeconfigGard::_deconfigParentAssoc(TARGETING::Target & i_target,

break;
} // TYPE_SMPGROUP
case TYPE_OMI:
{
TargetHandleList pOmicParentList;
getParentOmicTargetsByState(pOmicParentList,
&i_target, CLASS_NA, TYPE_OMIC,
UTIL_FILTER_ALL);

TargetHandle_t parentOmic = pOmicParentList[0];

HWAS_ASSERT((pOmicParentList.size() == 1),
"HWAS _deconfigParentAssoc: pOmicParentList != 1");

if (!anyChildFunctional(*parentOmic, TargetService::OMI_CHILD))
{
_deconfigureTarget(*parentOmic, i_errlEid, NULL,
i_deconfigRule);
}

break;
}
default:
{
// TYPE_MEMBUF, TYPE_MCA, TYPE_MCS, TYPE_MI, TYPE_DMI,
Expand Down

0 comments on commit 443a53b

Please sign in to comment.