diff options
author | Ben Gass <bgass@us.ibm.com> | 2017-02-16 16:00:05 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-02-24 07:25:15 -0500 |
commit | af9fbe825df749fa6a25d81726d671ccae7b91f8 (patch) | |
tree | 22ea14a26056ee0fd82bb6dda89a14947d5edb77 /src/import/chips | |
parent | 1c71c41dd6d4125e2f5ab495665de48f1f977a58 (diff) | |
download | talos-sbe-af9fbe825df749fa6a25d81726d671ccae7b91f8.tar.gz talos-sbe-af9fbe825df749fa6a25d81726d671ccae7b91f8.zip |
p9_thread_control poll more than once for thread running.
Based on HW403758 the L2 can block threads from sreset for
a period of time.
Change-Id: I704df2e970d9496257c565b99995887696ff7d2a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36594
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: CHRISTINA L. GRAVES <clgraves@us.ibm.com>
Reviewed-by: James N. Klazynski <jklazyns@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36688
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/core/p9_thread_control.C | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/import/chips/p9/procedures/hwp/core/p9_thread_control.C b/src/import/chips/p9/procedures/hwp/core/p9_thread_control.C index aa43549a..34e0ad73 100644 --- a/src/import/chips/p9/procedures/hwp/core/p9_thread_control.C +++ b/src/import/chips/p9/procedures/hwp/core/p9_thread_control.C @@ -67,6 +67,8 @@ static const uint64_t g_control_reg_map[] = 0x8080808000000000, // b1111 }; +static const uint64_t g_poll_for_running = 10; + //-------------------------------------------------------------------------- // Function definitions //-------------------------------------------------------------------------- @@ -112,10 +114,15 @@ static inline fapi2::ReturnCode threads_running( bool& o_ok) { // Running is defined as not in maint mode and not quiesced. + uint64_t l_trys = g_poll_for_running; uint64_t l_state = 0; - FAPI_TRY(p9_thread_control_query(i_target, i_threads, o_rasStatusReg, l_state), - "threads_running(): p9_thread_control_query() returns an error."); - o_ok = (l_state & THREAD_STATE_RUNNING); + + for (o_ok = false; !o_ok && l_trys > 0; l_trys--) + { + FAPI_TRY(p9_thread_control_query(i_target, i_threads, o_rasStatusReg, l_state), + "threads_running(): p9_thread_control_query() returns an error."); + o_ok = (l_state & THREAD_STATE_RUNNING); + } fapi_try_exit: return fapi2::current_err; |