From 11b5f7d2b616da7ba3ac2cacb52bd2b762872b9c Mon Sep 17 00:00:00 2001 From: Brian Stegmiller Date: Thu, 17 May 2018 15:43:02 -0500 Subject: ATTN: Examine correct proc for handling Centaur Attentions Change-Id: I3166c5331aa4b14152cc9d45bc57c9aefb9cb39f CQ:SW429174 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59015 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Zane C. Shelley Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Caleb N. Palmer Reviewed-by: Matt Derksen Reviewed-by: Daniel M. Crowell --- src/usr/diag/attn/common/attnmem.C | 22 +++++++++++++++++++--- src/usr/diag/attn/common/attnmem.H | 8 +++++--- src/usr/diag/attn/common/attnproc.C | 5 +++-- 3 files changed, 27 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/usr/diag/attn/common/attnmem.C b/src/usr/diag/attn/common/attnmem.C index 18ce8e53b..524262f67 100644 --- a/src/usr/diag/attn/common/attnmem.C +++ b/src/usr/diag/attn/common/attnmem.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -186,7 +186,8 @@ TargetHandle_t attnGetMembuf( const TargetHandle_t &i_mc, bool MemOps::resolve( PRDF::AttnData & i_AttnData, - const uint32_t i_mcNumber ) + const uint32_t i_mcNumber, + TARGETING::TargetHandle_t i_procTarg ) { errlHndl_t l_err = 0; bool l_attnFound = false; @@ -198,7 +199,22 @@ bool MemOps::resolve( TargetHandleList l_mcTargetList; - getAllChiplets(l_mcTargetList, TYPE_MC, true ); + + // predicate of functional MC units + PredicateCTM l_unitMatch(CLASS_UNIT, TYPE_MC); + PredicateIsFunctional l_functional; + PredicatePostfixExpr l_pred; + + l_pred.push(&l_unitMatch).push(&l_functional).And(); + + // Get all MC units associated with input processor + targetService().getAssociated( + l_mcTargetList, + i_procTarg, + TARGETING::TargetService::CHILD_BY_AFFINITY, + TARGETING::TargetService::ALL, + &l_pred); + // Find correct MC chiplet for ( auto l_mc : l_mcTargetList ) diff --git a/src/usr/diag/attn/common/attnmem.H b/src/usr/diag/attn/common/attnmem.H index faf26e66a..4df5c21c2 100644 --- a/src/usr/diag/attn/common/attnmem.H +++ b/src/usr/diag/attn/common/attnmem.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -48,14 +48,16 @@ class MemOps : public AttentionOps * @brief resolve Find membuf attentions behind the supplied proc. * * @param[in] i_AttnData Where to put membuf target and attn type - * @param[out] i_mcNumber MC unit to examine (0 or 1) + * @param[in] i_mcNumber MC unit to examine (0 or 1) + * @param[in] i_procTarg Processor to examine for active MC units * * @retval true if i_AttnData was set to valid values * @retval false if i_AttnData is invalid (no memory attns) */ bool resolve( PRDF::AttnData & i_AttnData, - const uint32_t i_mcNumber ); + const uint32_t i_mcNumber, + TARGETING::TargetHandle_t i_procTarg ); /** * @brief dtor diff --git a/src/usr/diag/attn/common/attnproc.C b/src/usr/diag/attn/common/attnproc.C index cdd124c0b..48de38d0a 100644 --- a/src/usr/diag/attn/common/attnproc.C +++ b/src/usr/diag/attn/common/attnproc.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -84,7 +84,8 @@ errlHndl_t ProcOps::query(AttnData & i_attnToCheck, bool & o_active) if ( scomData & ((MC::firstChiplet) >> l_mc) ) { // Will handle the first attention - l_cenAttnFound = memOps.resolve( i_attnToCheck, l_mc); + l_cenAttnFound = memOps.resolve( i_attnToCheck, l_mc, + i_attnToCheck.targetHndl ); // i_attnToCheck gets altered to membuf // if we found valid attention there -- cgit v1.2.1