From 1e9e686d61cc4d48fcbb5b514dde008f92fd4388 Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Wed, 16 May 2018 13:18:30 -0500 Subject: PRD: Adjust proc to membuf getConnectedChild Change-Id: If7f256482c2f1f1dd5ac5bc1df2b8b768d2101f7 CQ: SW429054 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58928 Tested-by: Jenkins Server Reviewed-by: Matt Derksen Reviewed-by: Zane C. Shelley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58938 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins --- src/usr/diag/prdf/common/plat/prdfTargetServices.C | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'src/usr') 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 ) { -- cgit v1.2.1