diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-08-28 15:18:05 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-09-11 14:44:18 -0500 |
commit | 79ce78da45859a79044a377dd18b15920fcd9542 (patch) | |
tree | 79a2670d585a76729d79e54b85da27f036e58fbe /src | |
parent | 2283a24d0273ae66ec0b826a7b9ed567bba1f0ef (diff) | |
download | talos-hostboot-79ce78da45859a79044a377dd18b15920fcd9542.tar.gz talos-hostboot-79ce78da45859a79044a377dd18b15920fcd9542.zip |
Add mutex to SCAN device driver.
Change-Id: I3c2b1e184c28779871b2e273b22b4a50b5e21a26
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5978
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/scan/scandd.C | 6 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 14 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types_hb.xml | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/usr/scan/scandd.C b/src/usr/scan/scandd.C index 4ea77d0e0..4b5d891b8 100644 --- a/src/usr/scan/scandd.C +++ b/src/usr/scan/scandd.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -224,6 +224,9 @@ errlHndl_t scanDoScan( DeviceFW::OperationType i_opType, size_t op_size = sizeof(uint64_t); uint32_t l_buffer[2]; // local scom buffer + mutex_t* l_mutex = i_target->getHbMutexAttr<TARGETING::ATTR_SCAN_MUTEX>(); + mutex_lock(l_mutex); + do { @@ -647,6 +650,7 @@ errlHndl_t scanDoScan( DeviceFW::OperationType i_opType, } }while(0); + mutex_unlock(l_mutex); return l_err; } diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index 2f81d543a..208d2a5f0 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -161,6 +161,20 @@ </attribute> <attribute> + <id>SCAN_MUTEX</id> + <description>Mutex for SCAN operations</description> + <simpleType> + <hbmutex> + <default>0</default> + </hbmutex> + </simpleType> + <persistency>volatile-zeroed</persistency> + <readable/> + <writeable/> + <hbOnly/> +</attribute> + +<attribute> <id>SLW_IMAGE_ADDR</id> <description> Location of runtime winkle image for this processor chip. diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml index 05d032116..e5dfd4498 100644 --- a/src/usr/targeting/common/xmltohb/target_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml @@ -48,6 +48,7 @@ <attribute> <id>SCOM_IND_MUTEX</id> </attribute> + <attribute><id>SCAN_MUTEX</id></attribute> <!-- new attribute for isteps 15 & 16 --> <attribute> <id>SLW_IMAGE_ADDR</id> @@ -86,6 +87,7 @@ <attribute> <id>SCOM_IND_MUTEX</id> </attribute> + <attribute><id>SCAN_MUTEX</id></attribute> <attribute> <id>IBSCOM_VIRTUAL_ADDR</id> </attribute> |