summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2016-05-13 10:40:00 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-05-18 18:08:41 -0400
commite2086d84638e3e89d4df7e751945f52411a029fc (patch)
tree722db3ef4363b785ccaf6fdbeb211c02204a68e6 /src/import/chips/p9/procedures
parentcbb710598089d78c5e6f58730de9c017b287db9d (diff)
downloadtalos-hostboot-e2086d84638e3e89d4df7e751945f52411a029fc.tar.gz
talos-hostboot-e2086d84638e3e89d4df7e751945f52411a029fc.zip
Add option to make c_str_storage not thread_local
Hostboot is having issue with thread-local again, putting this in until it is resolved Change-Id: Ia1c6f447dd9d83700075874bf69034a756f01a4d RTC:153924 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24514 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Brian R. Silver <bsilver@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24595 Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C8
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.H7
2 files changed, 13 insertions, 2 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C b/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C
index ad7a80941..9360c2e11 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C
@@ -42,7 +42,13 @@ namespace mss
{
// Thread local storage for the string we're going to create.
-thread_local char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
+//TODO RTC:153924 Remove the else case when issue is resolved
+#ifndef PLAT_NO_THREAD_LOCAL_STORAGE
+ thread_local char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
+#else
+ char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
+#endif
+
template<>
const char* c_str( const fapi2::template Target<fapi2::TARGET_TYPE_DIMM>& i_target )
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.H b/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.H
index 0b6263dc4..6c6532b9c 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.H
@@ -36,7 +36,12 @@ namespace mss
{
// Thread local storage for the string we're going to create.
-extern thread_local char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
+//TODO RTC:153924 Remove the else case when issue is resolved
+#ifndef PLAT_NO_THREAD_LOCAL_STORAGE
+ extern thread_local char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
+#else
+ extern char c_str_storage[fapi2::MAX_ECMD_STRING_LEN];
+#endif
template< fapi2::TargetType T >
const char* c_str( const fapi2::template Target<T>& i_target )
OpenPOWER on IntegriCloud