diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2014-08-11 18:21:15 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-09-22 13:25:39 -0500 |
commit | d45b9d097a66478cbf9d0aa8324becf414582128 (patch) | |
tree | 8b4af6ca3262a33274642891de851499a045fb4c /src/usr | |
parent | 9cc8c4e87e331944bce8fb527564ff254af799cf (diff) | |
download | talos-hostboot-d45b9d097a66478cbf9d0aa8324becf414582128.tar.gz talos-hostboot-d45b9d097a66478cbf9d0aa8324becf414582128.zip |
PRD: Refactored ServiceDataCollector::GetMruList()
Change-Id: I01b6bbbe87e9f061eda92be5d203e50b214ce367
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13255
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13456
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
9 files changed, 47 insertions, 68 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C index 9e4576d8f..4afa855a2 100755 --- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C +++ b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C @@ -206,7 +206,7 @@ int32_t PllDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData, // If only one detected the error, add it to the callout list. if ( 1 == count ) { - const uint32_t tmpCount = serviceData.service_data->GetMruList().size(); + const uint32_t tmpCount = serviceData.service_data->getMruListSize(); // Call this chip's CalloutPll plugin if it exists. ExtensibleChipFunction * l_callout = @@ -217,7 +217,7 @@ int32_t PllDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData, PluginDef::bindParm<STEP_CODE_DATA_STRUCT &>(serviceData) ); } - if ( tmpCount == serviceData.service_data->GetMruList().size() ) + if ( tmpCount == serviceData.service_data->getMruListSize() ) { // No additional callouts were made so add this chip to the list. serviceData.service_data->SetCallout( chip()[0]->GetChipHandle()); diff --git a/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h index 7fbdf372e..f811b65dc 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1998,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -102,7 +104,7 @@ public: <br><b>Parameters: </b> ServiceDataCollector <br><b>Returns: </b> Return code [SUCCESS | nonZero] <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ + <br><b>Promises: </b> serviceData::getMruList().GetCount()++ <br><b>Exceptions: </b> None. </ul><br> */ diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h index 94d410ace..ec0b988db 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h @@ -225,7 +225,7 @@ public: <br><b>Parameters: </b> a valid PRDcallout & PRDpriority <br><b>Returns: </b> None. <br><b>Requirements:</b> None - <br><b>Promises: </b> GetMruList().GetCount()++ + <br><b>Promises: </b> getMruList().GetCount()++ <br><b>Exceptions: </b> None. <br><b>Notes: </b> No implementation for Apache or Northstar </ul><br> @@ -247,21 +247,14 @@ public: */ void AddSignatureList( ErrorSignature & i_sig ); - /** - Access the list of Mrus - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> SDC_MRU_LIST - @see MruListClass - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> No implementation for Apache or Northstar - </ul><br> - */ - SDC_MRU_LIST & GetMruList(void); // dg07 + /** @return The list of MRUs currently stored in the SDC. */ + const SDC_MRU_LIST & getMruList() const { return xMruList; } + + /** @return The size of the MRU list currently stored in the SDC. */ + size_t getMruListSize() const { return xMruList.size(); } - PRDF_SIGNATURES & GetSignatureList(void); // jl00 + /** @return The secondary signature list stored in the SDC. */ + const PRDF_SIGNATURES & getSignatureList() const { return iv_SignatureList;} /** Clear the list of MruCallouts diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl index 4732ec63c..169c14cab 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl @@ -125,18 +125,4 @@ void ServiceDataCollector::ClearSignatureList(void) iv_SignatureList.erase(iv_SignatureList.begin(),iv_SignatureList.end()); // jl00 } - -inline -SDC_MRU_LIST & ServiceDataCollector::GetMruList(void) -{ - return xMruList; -} - -inline -PRDF_SIGNATURES & ServiceDataCollector::GetSignatureList(void) -{ - return iv_SignatureList; -} - - } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C index 4f1aa30ba..de3bc51da 100644 --- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C +++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C @@ -112,7 +112,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, errlSeverity severityParm = ERRL_SEV_RECOVERED; #endif - SDC_MRU_LIST fspmrulist; PRDcallout thiscallout; PRDpriority thispriority; epubProcedureID thisProcedureID; @@ -334,13 +333,13 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, // HIGH priority. bool sappSwNoGardReq = false, sappHwNoGardReq = false; - fspmrulist = sdc.GetMruList(); - int32_t calloutsPlusDimms = fspmrulist.size(); + const SDC_MRU_LIST & mruList = sdc.getMruList(); + int32_t calloutsPlusDimms = mruList.size(); - for ( SDC_MRU_LIST::iterator i = fspmrulist.begin(); i < fspmrulist.end(); - ++i) + for ( SDC_MRU_LIST::const_iterator it = mruList.begin(); + it < mruList.end(); ++it ) { - thiscallout = i->callout; + thiscallout = it->callout; if ( PRDcalloutData::TYPE_SYMFRU == thiscallout.getType() ) { if ( (EPUB_PRC_SP_CODE == thiscallout.flatten()) || @@ -348,12 +347,12 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, { SW = true; - if ( MRU_LOW != i->priority ) + if ( MRU_LOW != it->priority ) { sappSwNoGardReq = true; } - if ( MRU_MED == i->priority ) + if ( MRU_MED == it->priority ) { SW_High = true; } @@ -362,7 +361,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, { SecondLevel = true; - if ( MRU_LOW != i->priority ) + if ( MRU_LOW != it->priority ) { sappSwNoGardReq = true; } @@ -379,7 +378,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, calloutsPlusDimms = calloutsPlusDimms + partCount -1; HW = true; //hardware callout - if ( MRU_LOW == i->priority ) + if ( MRU_LOW == it->priority ) { sappHwNoGardReq = true; } @@ -390,7 +389,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, // Determines if all the hardware callouts have low priority. - if ( MRU_LOW == i->priority ) + if ( MRU_LOW == it->priority ) { sappHwNoGardReq = true; } @@ -502,13 +501,11 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, prdGardErrType = GardAction::NoGard; } - fspmrulist = sdc.GetMruList(); - - for ( SDC_MRU_LIST::iterator i = fspmrulist.begin(); - i < fspmrulist.end(); ++i ) + for ( SDC_MRU_LIST::const_iterator it = mruList.begin(); + it < mruList.end(); ++it ) { - thispriority = (*i).priority; - thiscallout = (*i).callout; + thispriority = it->priority; + thiscallout = it->callout; if ( PRDcalloutData::TYPE_TARGET == thiscallout.getType() ) { @@ -586,7 +583,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, // are not predictive. if ( HWAS::GARD_Predictive == gardErrType ) { - deallocateDimms( fspmrulist ); + deallocateDimms( mruList ); } //************************************************************** @@ -826,18 +823,18 @@ void ErrDataService::initPfaData( ServiceDataCollector & i_sdc, o_pfa.secAttnType = i_sdc.GetCauseAttentionType(); // Build the MRU list into PFA data. - SDC_MRU_LIST fspmrulist = i_sdc.GetMruList(); + const SDC_MRU_LIST & mruList = i_sdc.getMruList(); uint32_t i; // Iterator used to set limited list count. - for ( i = 0; i < fspmrulist.size() && i < MruListLIMIT; i++ ) + for ( i = 0; i < mruList.size() && i < MruListLIMIT; i++ ) { - o_pfa.mruList[i].callout = fspmrulist[i].callout.flatten(); - o_pfa.mruList[i].type = fspmrulist[i].callout.getType(); - o_pfa.mruList[i].priority = (uint8_t)fspmrulist[i].priority; + o_pfa.mruList[i].callout = mruList[i].callout.flatten(); + o_pfa.mruList[i].type = mruList[i].callout.getType(); + o_pfa.mruList[i].priority = (uint8_t)mruList[i].priority; } o_pfa.mruListCount = i; // Build the signature list into PFA data - PRDF_SIGNATURES sigList = i_sdc.GetSignatureList(); + const PRDF_SIGNATURES & sigList = i_sdc.getSignatureList(); for ( i = 0; i < sigList.size() && i < SigListLIMIT; i++ ) { o_pfa.sigList[i].chipId = getHuid(sigList[i].target); @@ -921,13 +918,12 @@ void ErrDataService::printDebugTraces( ) PRDF_DTRAC( "PRDTRACE: Mask id: 0x%x", sdc.GetThresholdMaskId() ); } - SDC_MRU_LIST fspmrulist = sdc.GetMruList(); - - for ( SDC_MRU_LIST::iterator i = fspmrulist.begin(); - i < fspmrulist.end(); ++i ) + const SDC_MRU_LIST & mruList = sdc.getMruList(); + for ( SDC_MRU_LIST::const_iterator it = mruList.begin(); + it < mruList.end(); ++it ) { tmp = "Unknown"; - switch ( i->priority ) + switch ( it->priority ) { case MRU_LOW: tmp = "LOW"; break; case MRU_MEDC: tmp = "MED_C"; break; @@ -937,7 +933,7 @@ void ErrDataService::printDebugTraces( ) case MRU_HIGH: tmp = "HIGH"; break; } PRDF_DTRAC( "PRDTRACE: Callout=0x%08x Priority=%s", - i->callout.flatten(), tmp ); + it->callout.flatten(), tmp ); } PRDF_DTRAC ("GardType: %s", GardAction::ToString( sdc.QueryGard() ) ); diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H index de953dd2e..be9d0872c 100644 --- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H +++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H @@ -194,7 +194,7 @@ class ErrDataService * * @param i_mruList MRU callout list. */ - void deallocateDimms( SDC_MRU_LIST & i_mruList ); + void deallocateDimms( const SDC_MRU_LIST & i_mruList ); /** * @brief Must check for MP-IPL eligibility before requesting SW or SH diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C index d8e9e98c9..8a48684ec 100644 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -693,7 +695,7 @@ void CenMbaTdCtlrCommon::badPathErrorHandling( STEP_CODE_DATA_STRUCT & io_sc ) // Level Support). Note that iv_mark is not always guaranteed to be // valid for every error scenario. For simplicity, callout the rank that // was targeted with low priority. - if ( 1 == io_sc.service_data->GetMruList().size() ) + if ( 1 == io_sc.service_data->getMruListSize() ) { MemoryMru memmru ( iv_mbaTrgt, iv_rank, MemoryMruData::CALLOUT_RANK ); io_sc.service_data->SetCallout( memmru, MRU_LOW ); diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C index 1cf55b61d..e6a46ab8d 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Proc.C @@ -840,7 +840,7 @@ int32_t calloutPhb( ExtensibleChip * i_procChip, STEP_CODE_DATA_STRUCT & io_sc, } // If no PHBs called out, callout 2nd level support. - if ( (SUCCESS != l_rc) || (0 == io_sc.service_data->GetMruList().size()) ) + if ( (SUCCESS != l_rc) || (0 == io_sc.service_data->getMruListSize()) ) io_sc.service_data->SetCallout( NextLevelSupport_ENUM ); return SUCCESS; // Intentionally returns SUCCESS so rule code does not get diff --git a/src/usr/diag/prdf/framework/service/prdfRasServices.C b/src/usr/diag/prdf/framework/service/prdfRasServices.C index d98ca1152..08dd91cb2 100644 --- a/src/usr/diag/prdf/framework/service/prdfRasServices.C +++ b/src/usr/diag/prdf/framework/service/prdfRasServices.C @@ -59,7 +59,7 @@ void ErrDataService::MnfgTrace( ErrorSignature * i_esig, //-------------------------------------------------------------------- -void ErrDataService::deallocateDimms( SDC_MRU_LIST & i_mruList ) +void ErrDataService::deallocateDimms( const SDC_MRU_LIST & i_mruList ) { //No OP for HB } |