diff options
author | Joe McGill <jmcgill@us.ibm.com> | 2018-06-14 14:23:14 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2018-06-22 10:23:56 -0400 |
commit | d93fbb365235be5e954d92a6e5adaf54e3ef7bef (patch) | |
tree | d0db72cc1e95307113b79798f4d0fdd76b7bc992 /src/import/chips/p9 | |
parent | d848b2c3bae0a6d2884071ed898d8cc6bdafb7fb (diff) | |
download | talos-hostboot-d93fbb365235be5e954d92a6e5adaf54e3ef7bef.tar.gz talos-hostboot-d93fbb365235be5e954d92a6e5adaf54e3ef7bef.zip |
correctly propogate bad return code from p9_adu_coherent_status_check
p9_adu_access.C
p9_adu_setup.C
save current_err to local return code object at start of exit path,
and return the saved value at exit (prior code was clobbering
current_err by call to cleanup routines)
Change-Id: I2f247ba2e93c673b3581e3ebe1504d4f05cb3a24
CQ: SW434090
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60607
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60619
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C | 14 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_adu_setup.C | 12 |
2 files changed, 17 insertions, 9 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C b/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C index 8f5d1253c..88e5720eb 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C @@ -65,6 +65,7 @@ extern "C" { bool l_busyBitStatus = false; adu_status_busy_handler l_busyHandling; + fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS; // mark HWP entry FAPI_DBG("Entering ...\n"); @@ -147,8 +148,11 @@ extern "C" { fapi_try_exit: + l_rc = fapi2::current_err; + FAPI_DBG("Error to return : %08X", (uint64_t) l_rc); + //If there is an error and we want to cleanup the ADU - if ( fapi2::current_err && l_myAduFlag.getOperFailCleanup() ) + if ( l_rc && l_myAduFlag.getOperFailCleanup() ) { //reset the ADU (void) p9_adu_coherent_utils_reset_adu(i_target); @@ -160,16 +164,16 @@ extern "C" { //Append the input data to an error if we got an error back #ifndef __PPE__ - if (fapi2::current_err) + if (l_rc) { - p9_adu_coherent_append_input_data(i_address, i_rnw, i_flags, fapi2::current_err); + p9_adu_coherent_append_input_data(i_address, i_rnw, i_flags, l_rc); } #endif - FAPI_DBG("Exiting..."); + FAPI_DBG("Exiting with return code : %08X...", (uint64_t) l_rc); //Return the error that we got from up above - return fapi2::current_err; + return l_rc; } } // extern "C" diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_adu_setup.C b/src/import/chips/p9/procedures/hwp/nest/p9_adu_setup.C index 3ce463841..285e2e98b 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_adu_setup.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_adu_setup.C @@ -55,6 +55,7 @@ extern "C" uint32_t& o_numGranules) { //return code + fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS; uint32_t num_attempts = 1; bool lock_pick = false; @@ -129,9 +130,12 @@ extern "C" fapi_try_exit: + l_rc = fapi2::current_err; + FAPI_DBG("Error to return : %08X", (uint64_t) l_rc); + //if an error has occurred, ADU is dirty, and instructed to clean up, //attempt to reset ADU and free lock (propogate rc of original fail) - if (fapi2::current_err && adu_is_dirty && !adu_leave_dirty) + if (l_rc && adu_is_dirty && !adu_leave_dirty) { (void) p9_adu_coherent_utils_reset_adu(i_target); (void) p9_adu_coherent_manage_lock(i_target, false, false, num_attempts); @@ -140,15 +144,15 @@ extern "C" //Append the input data to an error if we got an error back #ifndef __PPE__ - if (fapi2::current_err) + if (l_rc) { p9_adu_coherent_append_input_data(i_address, i_rnw, i_flags, fapi2::current_err); } #endif - FAPI_DBG("Exiting..."); - return fapi2::current_err; + FAPI_DBG("Exiting with return code : %08X...", (uint64_t) l_rc); + return l_rc; } } // extern "C" |