diff options
author | Mike Baiocchi <mbaiocch@us.ibm.com> | 2018-05-16 10:42:04 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-05-18 10:05:18 -0400 |
commit | 8e8b74fdbd588872c346a6b1038f07e9c561406d (patch) | |
tree | 0b8f1ce657398601c6bafec5bd7df5a0f593ead4 /src/usr/targeting/common/targetservice.C | |
parent | 79e4184e41b7d2e92bcc6bc6155007d85310406b (diff) | |
download | talos-hostboot-8e8b74fdbd588872c346a6b1038f07e9c561406d.tar.gz talos-hostboot-8e8b74fdbd588872c346a6b1038f07e9c561406d.zip |
Add option to masterProcChipTargetHandle() to return functional chip
This commit adds an option to the two masterProcChipTargetHandle()
functions to only look for and return a functional master proc chip
as necessary with the issue in Defect SW424528. The default behavior
of these functions - where the functionality is not checked - remains
the same. Once use of these functions has also been updated to use
this new option.
Change-Id: I37049d2cb9299a9404b57d85031a364bdb257c82
CQ:SW424528
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58920
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/targetservice.C')
-rw-r--r-- | src/usr/targeting/common/targetservice.C | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/src/usr/targeting/common/targetservice.C b/src/usr/targeting/common/targetservice.C index 940c5dd39..c5dad4f5d 100644 --- a/src/usr/targeting/common/targetservice.C +++ b/src/usr/targeting/common/targetservice.C @@ -702,14 +702,16 @@ Target* TargetService::toTarget( void TargetService::masterProcChipTargetHandle( Target*& o_masterProcChipTargetHandle, - const Target* i_pNodeTarget) const + const Target* i_pNodeTarget, + const bool i_onlyFunctional) const { #define TARG_FN "masterProcChipTargetHandle(...)" errlHndl_t pError = NULL; pError = queryMasterProcChipTargetHandle( o_masterProcChipTargetHandle, - i_pNodeTarget); + i_pNodeTarget, + i_onlyFunctional); if(pError != NULL) { /* Error is already traced w.r.t api called, not repeating here*/ @@ -727,7 +729,8 @@ void TargetService::masterProcChipTargetHandle( errlHndl_t TargetService::queryMasterProcChipTargetHandle( Target*& o_masterProcChipTargetHandle, - const Target* const i_pNodeTarget) const + const Target* const i_pNodeTarget, + const bool i_onlyFunctional) const { #define TARG_FN "queryMasterProcChipTargetHandle(...)" @@ -744,15 +747,25 @@ errlHndl_t TargetService::queryMasterProcChipTargetHandle( { static Target* pActingMasterTarget = NULL; - if(!pActingMasterTarget || PLAT::PROPERTIES::MULTINODE_AWARE) + if(!pActingMasterTarget + || PLAT::PROPERTIES::MULTINODE_AWARE + || i_onlyFunctional ) { // Create filter that finds acting master processors PredicateCTM procFilter(CLASS_CHIP, TYPE_PROC); PredicateAttrVal<ATTR_PROC_MASTER_TYPE> actingMasterFilter( PROC_MASTER_TYPE_ACTING_MASTER); + PredicateHwas functionalFilter; + functionalFilter.functional(true); PredicatePostfixExpr actingMasterProcFilter; actingMasterProcFilter.push(&procFilter).push( - &actingMasterFilter).And(); + &actingMasterFilter).And(); + + // Limit to only functional procs if requested + if (i_onlyFunctional) + { + actingMasterProcFilter.push(&functionalFilter).And(); + } // Find all the acting master processors (max one per physical // node), sorted by fabric node ID, and return the one with the @@ -777,7 +790,8 @@ errlHndl_t TargetService::queryMasterProcChipTargetHandle( } if( (pMasterProc) - && (!PLAT::PROPERTIES::MULTINODE_AWARE)) + && (!PLAT::PROPERTIES::MULTINODE_AWARE) + && (!i_onlyFunctional)) { pActingMasterTarget = pMasterProc; } @@ -798,10 +812,19 @@ errlHndl_t TargetService::queryMasterProcChipTargetHandle( PROC_MASTER_TYPE_ACTING_MASTER); PredicateCTM l_procPredicate(TARGETING::CLASS_CHIP,TARGETING::TYPE_PROC); + PredicateHwas functionalFilter; + functionalFilter.functional(true); PredicatePostfixExpr l_masterProcFilter; l_masterProcFilter.push(&l_procPredicate).push( &l_procMasterMatches).And(); + + // Limit to only functional procs if requested + if (i_onlyFunctional) + { + l_masterProcFilter.push(&functionalFilter).And(); + } + // Find the acting master within the node TARGETING::TargetHandleList l_masterProclist; getAssociated(l_masterProclist, |