summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2012-09-04 14:13:07 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-09-07 10:13:30 -0500
commit19147cdfa872a06ef97b8437e2abc152c581dbb0 (patch)
treeb89a204d666d5ca854e82a7a0ed25f9b44fc80df /src
parent8fdce540fed17630af2fe1412c963167e0a63a9c (diff)
downloadtalos-hostboot-19147cdfa872a06ef97b8437e2abc152c581dbb0.tar.gz
talos-hostboot-19147cdfa872a06ef97b8437e2abc152c581dbb0.zip
remove unneeded mutex lock/unlock on hwas proces callout set/get functions.
Change-Id: I9f0907b271f01d1bbbbce7c5492bb34338e2cad9 RTC: 48001 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/errl/errlmanager.H54
-rw-r--r--src/usr/errl/errlmanager.C62
2 files changed, 51 insertions, 65 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index 3dc21b895..2ac6bd69f 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/include/usr/errl/errlmanager.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/errl/errlmanager.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef ERRLMANAGER_H
#define ERRLMANAGER_H
/**
@@ -135,7 +134,10 @@ public:
*
* @return HWAS::processCalloutFn function pointer
*/
- HWAS::processCalloutFn getHwasProcessCalloutFn() const;
+ HWAS::processCalloutFn getHwasProcessCalloutFn() const
+ {
+ return iv_hwasProcessCalloutFn;
+ }
protected:
/**
@@ -191,10 +193,6 @@ private:
*/
HWAS::processCalloutFn iv_hwasProcessCalloutFn;
- /**
- * @brief Serialization for accessing iv_hwasProcessCalloutFn
- */
- mutable mutex_t iv_hwasMutex;
};
} // End namespace
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index c615aeeba..bc4e84c0b 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/usr/errl/errlmanager.C $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/errl/errlmanager.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file errlmanager.C
*
@@ -85,7 +84,6 @@ ErrlManager::ErrlManager()
iv_hwasProcessCalloutFn = NULL;
mutex_init(&iv_commitMutex);
- mutex_init(&iv_hwasMutex);
// Scaffolding.
// For now, put error logs in a 64KB buffer in L3 RAM
@@ -200,20 +198,10 @@ uint32_t ErrlManager::getUniqueErrId()
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::setHwasProcessCalloutFn(HWAS::processCalloutFn i_fn)
{
- mutex_lock(&(ERRORLOG::theErrlManager::instance().iv_hwasMutex));
+ // sync to ensure that all of HWAS is fully constructed BEFORE we
+ // write this function pointer
+ lwsync();
ERRORLOG::theErrlManager::instance().iv_hwasProcessCalloutFn = i_fn;
- mutex_unlock(&(ERRORLOG::theErrlManager::instance().iv_hwasMutex));
-}
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-HWAS::processCalloutFn ErrlManager::getHwasProcessCalloutFn() const
-{
- HWAS::processCalloutFn l_fp = NULL;
- mutex_lock(&iv_hwasMutex);
- l_fp = iv_hwasProcessCalloutFn;
- mutex_unlock(&iv_hwasMutex);
- return l_fp;
}
///////////////////////////////////////////////////////////////////////////////
OpenPOWER on IntegriCloud