summaryrefslogtreecommitdiffstats
path: root/src/usr/intr
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2016-04-27 06:08:35 -0500
committerMatthew A. Ploetz <maploetz@us.ibm.com>2016-07-07 12:13:44 -0400
commit3032116e9cf00de3b38736a37652cbb99a904d7b (patch)
treee9223e0748fc0bdd14aac7916e6ee839469fc07f /src/usr/intr
parent89675ddf45b0bf157253de6989e535f66b73aedb (diff)
downloadtalos-hostboot-3032116e9cf00de3b38736a37652cbb99a904d7b.tar.gz
talos-hostboot-3032116e9cf00de3b38736a37652cbb99a904d7b.zip
Close timing window between PSUDD and INTR
Change-Id: Ifb6ab16bbb06335c7b898c77ffe308b6ff78ef86 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23719 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/intr')
-rw-r--r--src/usr/intr/intrrp.C16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/usr/intr/intrrp.C b/src/usr/intr/intrrp.C
index c09e19559..25bf01d82 100644
--- a/src/usr/intr/intrrp.C
+++ b/src/usr/intr/intrrp.C
@@ -211,8 +211,9 @@ void IntrRp::acknowledgeInterrupt()
//A uint16 store from the Acknowledge Hypervisor Interrupt
// offset in the Thread Management BAR space signals
// the interrupt is acknowledged
- uint16_t * l_ack_int_ptr = (uint16_t *)iv_xiveTmBar1Address;
+ volatile uint16_t * l_ack_int_ptr = (uint16_t *)iv_xiveTmBar1Address;
l_ack_int_ptr += ACK_HYPERVISOR_INT_REG_OFFSET;
+ eieio();
uint16_t l_ackRead = *l_ack_int_ptr;
TRACFCOMP(g_trac_intr, "IntrRp::acknowledgeInterrupt(), read result: %16x", l_ackRead);
@@ -370,7 +371,7 @@ errlHndl_t IntrRp::enableInterrupts()
uint64_t * l_ic_ptr = iv_xiveIcBarAddress;
l_ic_ptr += XIVE_IC_BAR_INT_PC_MMIO_REG_OFFSET;
- XIVE_IC_THREAD_CONTEXT_t * l_xive_ic_ptr =
+ volatile XIVE_IC_THREAD_CONTEXT_t * l_xive_ic_ptr =
reinterpret_cast<XIVE_IC_THREAD_CONTEXT_t *>(l_ic_ptr);
TRACFCOMP(g_trac_intr, INFO_MRK"IntrRp::enableInterrupts() "
@@ -399,6 +400,7 @@ errlHndl_t IntrRp::enableInterrupts()
" Set phys_thread_enable1_reg: 0x%016lx", l_enable);
l_xive_ic_ptr->phys_thread_enable1_set = l_enable;
}
+ eieio();
//Set bit to configure LSI mode for HB cec interrupts
volatile XIVE_IVPE_THREAD_CONTEXT_t * this_ivpe_ptr =
@@ -856,7 +858,7 @@ errlHndl_t IntrRp::sendEOI(uint64_t& i_intSource)
TRACDCOMP(g_trac_intr, "IntrRp::sendEOI read response: %lx", eoiRead);
//EOI Part 2 - LSI ESB Internal to the IVPE
- uint64_t * l_lsiEoi = iv_xiveIcBarAddress;
+ volatile uint64_t * l_lsiEoi = iv_xiveIcBarAddress;
l_lsiEoi += XIVE_IC_LSI_EOI_OFFSET;
uint64_t l_intPending = *l_lsiEoi;
@@ -1047,7 +1049,7 @@ errlHndl_t IntrRp::handlePsuInterrupt(ext_intr_t i_type)
uint32_t l_addr = PSI_BRIDGE_PSU_DOORBELL_REG;
size_t scom_len = sizeof(uint64_t);
uint64_t reg = 0x0;
- uint64_t l_elapsed_time_ns = 0;
+ uint64_t l_num_yields = 0;
TARGETING::Target* procTarget = NULL;
TARGETING::targetService().masterProcChipTargetHandle( procTarget );
@@ -1072,15 +1074,15 @@ errlHndl_t IntrRp::handlePsuInterrupt(ext_intr_t i_type)
TRACDCOMP(g_trac_intr, "Host/SBE Mailbox "
"response. Wait for Polling to handle"
" response");
- nanosleep(0,10000);
- l_elapsed_time_ns += 10000;
+ task_yield(); // allow PSU mbox task to handle
+ l_num_yields += 1;
}
else
{
//Polling Complete
break;
}
- if (l_elapsed_time_ns > MAX_PSU_LONG_TIMEOUT_NS)
+ if (l_num_yields > 30)
{
TRACFCOMP(g_trac_intr, "PSU Timeout hit");
/*@ errorlog tag
OpenPOWER on IntegriCloud