diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2018-09-18 08:42:45 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-11-09 15:05:33 -0600 |
commit | 2dfa56b49d0ea5cbabea1a85c68964e626f3d345 (patch) | |
tree | e9ef03faea37586611d0e30b6b9821a050570b36 /src/usr/targeting/common/utilFilter.C | |
parent | 55c7c54ca26a41d350098096ebb437d8898f7040 (diff) | |
download | talos-hostboot-2dfa56b49d0ea5cbabea1a85c68964e626f3d345.tar.gz talos-hostboot-2dfa56b49d0ea5cbabea1a85c68964e626f3d345.zip |
Deconfig parent rollup simplified
Create a common deconfiguration rollup to parent.
A new attribute was created to indicate when to stop
rolling up the parent branch
Change-Id: I80954081527f29bc466622d30644115a96be385f
RTC:193268
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66444
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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/utilFilter.C')
-rw-r--r-- | src/usr/targeting/common/utilFilter.C | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C index 2be7cdabb..3675dfb04 100644 --- a/src/usr/targeting/common/utilFilter.C +++ b/src/usr/targeting/common/utilFilter.C @@ -455,6 +455,38 @@ const Target * getParentChip( const Target * i_pChiplet ) return l_pChip; } +Target * getImmediateParentByAffinity(const Target * i_child ) +{ + Target * l_parent = NULL; + + // Create a vector of TARGETING::Target pointers + TARGETING::TargetHandleList l_chipList; + + // Get parent + TARGETING::targetService().getAssociated(l_chipList, i_child, + TARGETING::TargetService::PARENT_BY_AFFINITY, + TARGETING::TargetService::IMMEDIATE, NULL); + + if (l_chipList.size() == 1) + { + l_parent = l_chipList[0]; + } + else if (l_chipList.size() == 0) + { + TARG_ERR("Failed to find a parent target for huid=%.8X", + TARGETING::get_huid(i_child)); + } + else + { + TARG_ERR("Found %d parent targets for huid=%.8X, only expected to find 1", + l_chipList.size(), + TARGETING::get_huid(i_child)); + } + + return l_parent; +} + + Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType) { Target * l_parent = NULL; |