summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2018-05-16 13:18:30 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-05-16 23:07:27 -0400
commit1e9e686d61cc4d48fcbb5b514dde008f92fd4388 (patch)
treed6091ae9c2cfae7ee9f8557db090671ef8b63e36
parent56ff2943a5df5c1f04e2ec0e0f0418f4b1d1ad7b (diff)
downloadtalos-hostboot-1e9e686d61cc4d48fcbb5b514dde008f92fd4388.tar.gz
talos-hostboot-1e9e686d61cc4d48fcbb5b514dde008f92fd4388.zip
PRD: Adjust proc to membuf getConnectedChild
Change-Id: If7f256482c2f1f1dd5ac5bc1df2b8b768d2101f7 CQ: SW429054 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58928 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58938 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>
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfTargetServices.C25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.C b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
index 1689014bf..cb4dce961 100755
--- a/src/usr/diag/prdf/common/plat/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
@@ -855,23 +855,14 @@ TargetHandle_t getConnectedChild( TargetHandle_t i_target, TYPE i_connType,
}
else if ( TYPE_PROC == trgtType && TYPE_MEMBUF == i_connType )
{
- // Get the interim DMI target.
- TargetHandle_t trgt = getConnectedChild( i_target, TYPE_DMI,
- i_connPos );
- if ( nullptr != trgt )
- {
- // Get the the MEMBUF connected to the DMI target.
- trgt = getConnectedChild( trgt, TYPE_MEMBUF, 0 );
- }
-
- if ( nullptr == trgt )
- {
- itr = list.end(); // just in case it is not found
- }
- else
- {
- *itr = trgt;
- }
+ // i_connPos is position relative to PROC (0-7)
+ itr = std::find_if( list.begin(), list.end(),
+ [&](const TargetHandle_t & t)
+ {
+ uint32_t mbPos = getTargetPosition(t);
+ return (trgtPos == (mbPos / MAX_MEMBUF_PER_PROC)) &&
+ (i_connPos == (mbPos % MAX_MEMBUF_PER_PROC));
+ } );
}
else if ( TYPE_DMI == trgtType && TYPE_MEMBUF == i_connType )
{
OpenPOWER on IntegriCloud