From e2086d84638e3e89d4df7e751945f52411a029fc Mon Sep 17 00:00:00 2001 From: crgeddes Date: Fri, 13 May 2016 10:40:00 -0500 Subject: 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 Reviewed-by: ANDRE A. MARIN Reviewed-by: Daniel M. Crowell Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24595 Tested-by: FSP CI Jenkins --- src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.C | 8 +++++++- src/import/chips/p9/procedures/hwp/memory/lib/utils/c_str.H | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/import/chips/p9/procedures') 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& 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& i_target ) -- cgit v1.2.1