diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2017-12-04 15:18:08 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-12-09 02:29:16 -0500 |
commit | 7a439687019f5fe0e49ddbd07ec48378a4340fb0 (patch) | |
tree | 65bc98d22a8fbc6ddb43bc7c6c047c3ff1cfe478 /src/import/chips | |
parent | d9ebe234862c9e400494430a5b9ba35991a009f2 (diff) | |
download | talos-sbe-7a439687019f5fe0e49ddbd07ec48378a4340fb0.tar.gz talos-sbe-7a439687019f5fe0e49ddbd07ec48378a4340fb0.zip |
Increase suspend_powman timeouts from 10 micro sec -> 10 milli sec
Our timeouts for suspend_powman were way to short. This commit
increases the timeouts by a factor of 1000. Per request from M.
Floyd on PM team.
Change-Id: I03c6e452a453979128d232c33d31ff9fd9dfbe6b
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50470
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50474
Reviewed-by: Hostboot Team <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/pm/p9_suspend_powman.C | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_suspend_powman.C b/src/import/chips/p9/procedures/hwp/pm/p9_suspend_powman.C index f9c54d7e..62467bb0 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_suspend_powman.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_suspend_powman.C @@ -55,8 +55,11 @@ #include <p9_pm_hcd_flags.h> #include <p9_collect_suspend_ffdc.H> -static const uint64_t POLLTIME_US = 1; +// 1000000 nanosecond = 1 millisecond +// total timeout = 10 milliseconds +static const uint64_t POLLTIME_NS = 1000000; static const uint64_t POLLTIME_MCYCLES = 4000; +static const uint32_t TRIES_BEFORE_TIMEOUT = 10; extern "C" { @@ -64,7 +67,7 @@ extern "C" { // Constant definitions //-------------------------------------------------------------------------- - const uint32_t c_tries_before_timeout = 10; + //-------------------------------------------------------------------------- // HWP entry point @@ -110,7 +113,7 @@ extern "C" { FAPI_TRY(fapi2::putScom(i_target, PU_OCB_OCI_OCCFLG_SCOM2, l_occflg_data), "Error setting OCC Flag register bit 2"); } - for (uint32_t i = 0; i < c_tries_before_timeout; i++) + for (uint32_t i = 0; i < TRIES_BEFORE_TIMEOUT; i++) { FAPI_TRY(fapi2::getScom(i_target, PU_OCB_OCI_OCCS2_SCOM, l_occs2_data), "Error reading OCC Scratch 2 register"); @@ -120,7 +123,7 @@ extern "C" { break; } - fapi2::delay(POLLTIME_US * 1000, POLLTIME_MCYCLES * 1000 * 1000); + fapi2::delay(POLLTIME_NS , POLLTIME_MCYCLES * 1000 * 1000); } if(l_pgpe_in_safe_mode) @@ -140,7 +143,7 @@ extern "C" { //This should cause the PGPE to observe a OCC Heartbeat interrupt, //causing it to enter PGPE pm_suspend flow - for (uint32_t i = 0; i < c_tries_before_timeout; i++) + for (uint32_t i = 0; i < TRIES_BEFORE_TIMEOUT; i++) { FAPI_TRY(fapi2::getScom(i_target, PU_OCB_OCI_OCCS2_SCOM, l_occs2_data), "Error reading OCC Scratch 2 register"); @@ -150,7 +153,7 @@ extern "C" { break; } - fapi2::delay(POLLTIME_US * 1000, POLLTIME_MCYCLES * 1000 * 1000); + fapi2::delay(POLLTIME_NS, POLLTIME_MCYCLES * 1000 * 1000); } //if timeout, hwp fails |