From 16ff4c0894f726ea97362536af36a413b1f255cd Mon Sep 17 00:00:00 2001 From: Nick Bofferding Date: Mon, 14 Mar 2016 11:27:49 -0500 Subject: Support getChildren and getParent FAPI2 tests - Added FAPI reason codes to support tests - Added special handlers to getParent/getChildren for pervasive associations - Added new APIs to filtering utilities to walk pervasive associations - Updated getParent/getChildren tests to fully exercise pervasive associations RTC: 148577 Change-Id: I0d8ec427e6c2092852a32c7da605d1c47c554b50 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22084 Tested-by: Jenkins Server Reviewed-by: Martin Gloff Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes Reviewed-by: Daniel M. Crowell --- src/include/usr/fapi2/target.H | 50 +++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 8 deletions(-) (limited to 'src/include/usr/fapi2/target.H') diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H index c11454f2f..5eb375336 100644 --- a/src/include/usr/fapi2/target.H +++ b/src/include/usr/fapi2/target.H @@ -456,11 +456,24 @@ inline Target Target::getParent(void) const TARGETING::TYPE requiredPType = fapi2::convertFapi2TypeToTargeting(T); - TARGETING::getParentAffinityTargetsByState(l_parentList, - static_cast(this->get()), - TARGETING::CLASS_NA, - requiredPType, - TARGETING::UTIL_FILTER_ALL); + if(T == fapi2::TARGET_TYPE_PERV) + { + TARGETING::getParentPervasiveTargetsByState( + l_parentList, + static_cast(this->get()), + TARGETING::CLASS_NA, + requiredPType, + TARGETING::UTIL_FILTER_ALL); + } + else + { + TARGETING::getParentAffinityTargetsByState( + l_parentList, + static_cast(this->get()), + TARGETING::CLASS_NA, + requiredPType, + TARGETING::UTIL_FILTER_ALL); + } assert(l_parentList.size() == 1, "Found %d parents of the same type. Target HUID %x , \ looking for parents of type %x", l_parentList.size(), TARGETING::get_huid(this->get()) , requiredPType); @@ -642,22 +655,43 @@ FAPI_DBG(ENTER_MRK "getChildren. Type 0x%08x State:0x%08x", T, i_state); TARGETING::TargetHandleList l_childList; bool l_functional = (i_state & fapi2::TARGET_STATE_FUNCTIONAL)? true:false; - if(!l_functional) { - TARGETING::getChildAffinityTargetsByState(l_childList, + if(K == fapi2::TARGET_TYPE_PERV) + { + TARGETING::getPervasiveChildTargetsByState(l_childList, + static_cast(this->get()), + TARGETING::CLASS_NA, + l_type, + TARGETING::UTIL_FILTER_ALL); + } + else + { + TARGETING::getChildAffinityTargetsByState(l_childList, static_cast(this->get()), TARGETING::CLASS_NA, l_type, TARGETING::UTIL_FILTER_ALL); + } } else { - TARGETING::getChildAffinityTargetsByState(l_childList, + if(K == fapi2::TARGET_TYPE_PERV) + { + TARGETING::getPervasiveChildTargetsByState(l_childList, + static_cast(this->get()), + TARGETING::CLASS_NA, + l_type, + TARGETING::UTIL_FILTER_FUNCTIONAL); + } + else + { + TARGETING::getChildAffinityTargetsByState(l_childList, static_cast(this->get()), TARGETING::CLASS_NA, l_type, TARGETING::UTIL_FILTER_FUNCTIONAL); + } } FAPI_DBG("getChildren: l_functional 0x%.8X, l_type = 0x%.8X, ChipUnitId 0x%.8X", -- cgit v1.2.3