summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-02-27 15:10:00 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2018-03-03 11:15:27 -0500
commit9abf4f390cca107a16b40e24410a0f2033586f7a (patch)
tree12bc2889978f05c98611361b35b9d023d37edbcd /src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
parent9aa046413267b31f1903f6fb07a0cce4c660ef5b (diff)
downloadtalos-hostboot-9abf4f390cca107a16b40e24410a0f2033586f7a.tar.gz
talos-hostboot-9abf4f390cca107a16b40e24410a0f2033586f7a.zip
PRD: getConnectedParent() issue in MemDealloc::dimmList()
Change-Id: Iead98b6d1a67bf83639f085b952359e9a5908899 CQ: SW418940 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54793 Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/55005 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>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C61
1 files changed, 38 insertions, 23 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C b/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
index 63143c0bb..f79bae5fe 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
@@ -662,32 +662,47 @@ int32_t dimmList( TargetHandleList & i_dimmList )
int32_t dimmList( TargetHandleList & i_dimmList )
{
- if (i_dimmList.size() == 0)
- return SUCCESS;
-
- // Determine MBA/MCA
- TYPE T = TYPE_MCA;
- TargetHandle_t dimmTgt = i_dimmList[0];
- TargetHandle_t tgt = getConnectedParent( dimmTgt, T );
- if ( NULL == tgt)
- {
- T = TYPE_MBA;
- tgt = getConnectedParent( dimmTgt, T );
- }
+ #define PRDF_FUNC "[MemDealloc::dimmList] "
- if (tgt == NULL)
+ int32_t o_rc = SUCCESS;
+
+ do
{
- PRDF_ERR( "[MemDealloc::dimmList] get parent tgt failed for 0x%08X",
- getHuid(dimmTgt));
- return FAIL;
- }
+ if ( i_dimmList.empty() ) break;
+
+ // Determine what target these DIMMs are connected to.
+ // Note that we cannot use getConnectedParent() because it will assert
+ // if there is no parent of that type.
+
+ TargetHandle_t dimmTrgt = i_dimmList.front();
+ TargetHandleList list;
+
+ // First, check for MCAs.
+ list = getConnected( dimmTrgt, TYPE_MCA );
+ if ( !list.empty() )
+ {
+ o_rc = dimmList<TYPE_MCA>( i_dimmList );
+ break;
+ }
+
+ // Second, check for MBAs.
+ list = getConnected( dimmTrgt, TYPE_MBA );
+ if ( !list.empty() )
+ {
+ o_rc = dimmList<TYPE_MBA>( i_dimmList );
+ break;
+ }
- if ( T == TYPE_MCA )
- return dimmList<TYPE_MCA>( i_dimmList );
- else if ( T == TYPE_MBA )
- return dimmList<TYPE_MBA>( i_dimmList );
- else
- return FAIL;
+ // If we get here we did not find a supported target.
+ PRDF_ERR( PRDF_FUNC "Unsupported connected parent to dimm 0x%08x",
+ getHuid(dimmTrgt) );
+ PRDF_ASSERT(false); // code bug
+
+ } while (0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
}
} //namespace MemDealloc
OpenPOWER on IntegriCloud