diff options
author | Joe McGill <jmcgill@us.ibm.com> | 2018-06-14 14:23:14 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2018-06-18 23:19:42 -0400 |
commit | c7e17788930d3432f1aed55f419fc05001b9c9ad (patch) | |
tree | cce9f94c66c179957d582ecafd2cce97e0e4baec /src | |
parent | e746b0c91ee1049092a7084a998da173ed27dc73 (diff) | |
download | talos-sbe-c7e17788930d3432f1aed55f419fc05001b9c9ad.tar.gz talos-sbe-c7e17788930d3432f1aed55f419fc05001b9c9ad.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/60618
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src')
-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 a1982c9e..cc2b4427 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 6c2c54b7..392576af 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" |