diff options
author | Chris Phan <cphan@us.ibm.com> | 2013-10-25 15:28:49 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-11-13 10:11:47 -0600 |
commit | 584cce07fa7485820b25e70b002f055ab109889f (patch) | |
tree | 6544e1281efebc6da8586932368488d48b1ec4f7 | |
parent | 3e8d696126b5524877f2af3ab2f8f8ef862225d6 (diff) | |
download | talos-hostboot-584cce07fa7485820b25e70b002f055ab109889f.tar.gz talos-hostboot-584cce07fa7485820b25e70b002f055ab109889f.zip |
PRD: add hwsv target lock support
Change-Id: Icb42369679466ff4e4b6dd705ba182e4500e3064
RTC: 86396
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/6885
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7207
-rwxr-xr-x | src/usr/diag/prdf/common/prdfMain_common.C | 11 | ||||
-rw-r--r-- | src/usr/diag/prdf/prdfGlobal.H | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C index f11bec2b7..be56e4835 100755 --- a/src/usr/diag/prdf/common/prdfMain_common.C +++ b/src/usr/diag/prdf/common/prdfMain_common.C @@ -88,6 +88,11 @@ errlHndl_t initialize() { PRDF_ENTER( "PRDF::initialize()" ); + // will unlock when going out of scope + // this lock is recursive so it's ok to lock again + // as long as calling from the same thread + PRDF_SYSTEM_SCOPELOCK; + g_prd_errlHndl = NULL; // This forces any previous errls to be committed // Synchronize SCOM access to hardware @@ -151,6 +156,9 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType, { PRDF_ENTER( "PRDF::main() Global attnType=%04X", i_attentionType ); + // will unlock when going out of scope + PRDF_SYSTEM_SCOPELOCK; + g_prd_errlHndl = NULL; uint32_t rc = SUCCESS; @@ -276,6 +284,9 @@ errlHndl_t refresh() errlHndl_t l_errl = NULL; + // will unlock when going out of scope + PRDF_SYSTEM_SCOPELOCK; + if((false == g_initialized) || (NULL == systemPtr)) { l_errl = initialize(); diff --git a/src/usr/diag/prdf/prdfGlobal.H b/src/usr/diag/prdf/prdfGlobal.H index 0f89ffe8d..9257db08d 100644 --- a/src/usr/diag/prdf/prdfGlobal.H +++ b/src/usr/diag/prdf/prdfGlobal.H @@ -77,4 +77,10 @@ #define PRDF_RUNTIME_DECONFIG( i_pTarget ) \ SUCCESS +/** + * @brief macro to acquire scope lock on system target + * This macro is currently not used in hostboot. + */ +#define PRDF_SYSTEM_SCOPELOCK + #endif // PRDF_GLOBAL_HB_H |