diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2014-06-10 09:37:23 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-06-27 14:39:32 -0500 |
commit | d944aad4ced420334396cebbfe5ffe133c175da6 (patch) | |
tree | b5b7b662bed5bdf196439414dd6e6f384d1faade /src/usr/xscom | |
parent | c1bf5ef6412c62c93232c0292695af6ed94b0fc4 (diff) | |
download | talos-hostboot-d944aad4ced420334396cebbfe5ffe133c175da6.tar.gz talos-hostboot-d944aad4ced420334396cebbfe5ffe133c175da6.zip |
Fix possible hang in XSCOM error path
Change-Id: I677bdeab0ee763d02e374cd4690f64116a508ed4
CQ: SW266264
Backport: release-fips811
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11531
Tested-by: Jenkins Server
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/xscom')
-rw-r--r-- | src/usr/xscom/piberror.C | 10 | ||||
-rw-r--r-- | src/usr/xscom/xscom.C | 39 |
2 files changed, 27 insertions, 22 deletions
diff --git a/src/usr/xscom/piberror.C b/src/usr/xscom/piberror.C index e879cdc29..5208604df 100644 --- a/src/usr/xscom/piberror.C +++ b/src/usr/xscom/piberror.C @@ -32,6 +32,7 @@ #include <xscom/piberror.H> #include <errl/errlmanager.H> #include <hwas/common/hwasCallout.H> +#include <targeting/common/targetservice.H> namespace PIB { @@ -87,7 +88,14 @@ void addFruCallouts(TARGETING::Target* i_target, break; case PIB::PIB_CLOCK_ERROR: //b101 - if (i_target->getAttr<TARGETING::ATTR_TYPE>() == + if (i_target == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL) + { + // SENTINEL is a proc so use the OSC path + io_errl->addClockCallout(i_target, + HWAS::OSCREFCLK_TYPE, + HWAS::SRCI_PRIORITY_LOW); + } + else if (i_target->getAttr<TARGETING::ATTR_TYPE>() == TARGETING::TYPE_PROC) { //check for PCI range diff --git a/src/usr/xscom/xscom.C b/src/usr/xscom/xscom.C index 017edcd0f..877f77faf 100644 --- a/src/usr/xscom/xscom.C +++ b/src/usr/xscom/xscom.C @@ -675,6 +675,8 @@ void collectXscomFFDC(TARGETING::Target* i_target, TRACFCOMP(g_trac_xscom,"collectXscomFFDC: XSCOM COLLECT FFDC STARTED"); + ERRORLOG::ErrlUserDetailsLogRegister l_logReg(i_target); + // Loop through the addresses you want to collect. for (int i = 0; i<4; i++) { @@ -699,17 +701,6 @@ void collectXscomFFDC(TARGETING::Target* i_target, io_buflen, l_hmer); - // Always want to collect the Register FFDC. Will append to the - // errorlog passed in by the caller and if the call got an error will - // append to that as well. - - // Collect the data from the read - ERRORLOG::ErrlUserDetailsLogRegister l_logReg(i_target); - - l_logReg.addDataBuffer(&io_buffer, sizeof(io_buffer), - DEVICE_XSCOM_ADDRESS(XscomAddr[i].addr)); - - // If not successful if (l_err) { @@ -720,9 +711,9 @@ void collectXscomFFDC(TARGETING::Target* i_target, // only add the Register data to the originating errorlog if successfull else { - // Add the register FFDC to the errorlog passed in. DO we do this - // all the time? And can we log to more than one errorlog? - l_logReg.addToLog(io_errl); + // Collect the data from the read + l_logReg.addDataBuffer(&io_buffer, sizeof(io_buffer), + DEVICE_XSCOM_ADDRESS(XscomAddr[i].addr)); } // unmap the device now that we are done with the scom to that area. @@ -733,6 +724,9 @@ void collectXscomFFDC(TARGETING::Target* i_target, } + // Add the register FFDC to the errorlog passed in. + l_logReg.addToLog(io_errl); + return; } @@ -792,13 +786,6 @@ errlHndl_t xscomPerformOp(DeviceFW::OperationType i_opType, // If we got a scom error. if (l_err) { - - // Add Callouts to the errorlog - PIB::addFruCallouts(i_target, - l_hmer.mXSComStatus, - l_addr, - l_err); - // Call XscomCollectFFDC.. collectXscomFFDC(i_target, l_virtAddr, @@ -826,6 +813,16 @@ errlHndl_t xscomPerformOp(DeviceFW::OperationType i_opType, // Done, un-pin task_affinity_unpin(); + // FRU callouts use targeting so this must be after the + // mutex is unlocked + // Add Callouts to the errorlog + if( l_err ) + { + PIB::addFruCallouts(i_target, + l_hmer.mXSComStatus, + l_addr, + l_err); + } } while (0); return l_err; |