From fc2a04496b8406eda78cd17ed2965400b60abdcb Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Wed, 21 Mar 2018 11:48:36 -0500 Subject: Ensure all hbmutex attributes get re-initialized on MPIPL We saw a bug where we were getting hung up on one of the i2c engine mutexes on MPIPL. We still haven't determined WHY we are seeing the mutex locked after an MPIPL but just to be safe we are now looping through all of the targets and checking each attribute to see if it is of type hbmutex. If it is then we will call mutex_init on the mutex to reset it so the mutex is ready to use. Change-Id: Ie05f7f49c4599c7cfc5d33c43d79cb977bb0cd13 CQ: SW420894 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56136 Reviewed-by: Martin Gloff Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Roland Veloz Reviewed-by: Daniel M. Crowell --- src/include/usr/targeting/common/targetservice.H | 20 ++++++++++++++++++-- src/include/usr/targeting/targplatreasoncodes.H | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/usr/targeting/common/targetservice.H b/src/include/usr/targeting/common/targetservice.H index 056dfb9a5..2c8133ae8 100644 --- a/src/include/usr/targeting/common/targetservice.H +++ b/src/include/usr/targeting/common/targetservice.H @@ -776,8 +776,24 @@ class TargetService AttrRP *i_attrRP, ATTRIBUTE_ID* &o_pAttrId, AbstractPointer* &o_ppAttrAddr); - - +#ifdef __HOSTBOOT_MODULE + /** + * @brief Reset all hostboot mutex attributes + * + * @par Detailed Description: + * Iterates through all targets and check each of their attributes to + * see if they are of type hbmutex. If we find a mutex attribute we will + * run mutex_init on it to reset it. + * + * @pre TargetService must be initialized. + * AttrRp must be initialized + * + * @post All hb mutex attributes on all targets have been reset + * + * @return void + */ + void resetMutexAttributes(); +#endif private: /** diff --git a/src/include/usr/targeting/targplatreasoncodes.H b/src/include/usr/targeting/targplatreasoncodes.H index ac93bf2b9..b38c0c646 100644 --- a/src/include/usr/targeting/targplatreasoncodes.H +++ b/src/include/usr/targeting/targplatreasoncodes.H @@ -61,6 +61,7 @@ enum PlatTargetingModuleId TARG_RT_HBRT_UPDATE_PREP = 0x85, TARG_RT_VALIDATEDATA = 0x86, TARG_RT_SAVERESTOREATTRS = 0x87, + TARG_SVC_RESET_MUTEX = 0x88, }; /** @@ -80,6 +81,7 @@ enum PlatTargetingReasonCode TARG_RT_SECTION_MISMATCH = TARG_COMP_ID | 0x86, TARG_RT_MISSING_ATTR = TARG_COMP_ID | 0x87, TARG_RT_BAD_ATTR_SIZES = TARG_COMP_ID | 0x88, + TARG_SVC_MISSING_ATTR = TARG_COMP_ID | 0x89, }; } // End TARGETING namespace -- cgit v1.2.3