From 82533df4b535112204b62bdc3940aa81a057b896 Mon Sep 17 00:00:00 2001 From: Brian Stegmiller Date: Thu, 27 Oct 2016 15:50:31 -0500 Subject: ATTN: Mask interrupts prior to sending EOI Change-Id: Ie25abeec6a6cea8438d14ac6d1828e0b9a8fb25a RTC: 163736 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31925 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Caleb N. Palmer Reviewed-by: Zane C. Shelley --- src/usr/diag/attn/common/attnsvc_common.C | 55 +++++++++++++------------------ 1 file changed, 22 insertions(+), 33 deletions(-) (limited to 'src/usr/diag/attn') diff --git a/src/usr/diag/attn/common/attnsvc_common.C b/src/usr/diag/attn/common/attnsvc_common.C index 0c4624814..71a24f7da 100644 --- a/src/usr/diag/attn/common/attnsvc_common.C +++ b/src/usr/diag/attn/common/attnsvc_common.C @@ -156,47 +156,32 @@ void ServiceCommon::processAttnPreAck(const TargetHandle_t i_proc) // do the minimum that is required // for sending EOI without getting - // another interrupt. for host attentions - // this is clearing the gpio interrupt - // type status register - // and for xstp,rec,spcl this is + // another interrupt. This should be // masking the appropriate bit in - // ipoll mask + // the ipoll mask. - // read the ipoll status register - // to determine the interrupt was - // caused by host attn or something - // else (xstp,rec,spcl) + // Instead of reading the IPOLL status + // register, we will just mask all + // potential interrupts on HOST side. - errlHndl_t err = getScom(i_proc, IPOLL_STATUS_REG, data); + data = hostMask | nonHostMask; - if(err) - { - errlCommit(err, ATTN_COMP_ID); - - // assume everything is on - - data = hostMask | nonHostMask; - } - - if(data & nonHostMask) - { - // mask local proc xstp,rec and/or special attns if on. + // the other thread might be trying to unmask + // on the same target. The mutex ensures + // neither thread corrupts the register. - // the other thread might be trying to unmask - // on the same target. The mutex ensures - // neither thread corrupts the register. + mutex_lock(&iv_mutex); - mutex_lock(&iv_mutex); + errlHndl_t err = modifyScom(i_proc, IPOLL::address, data, SCOM_OR); - err = modifyScom(i_proc, IPOLL::address, data & nonHostMask, SCOM_OR); + mutex_unlock(&iv_mutex); - mutex_unlock(&iv_mutex); + ATTN_TRACE("processAttnPreAck Host:%llx NonHost:%llx Data:%llx", + hostMask, nonHostMask, data); - if(err) - { - errlCommit(err, ATTN_COMP_ID); - } + if(err) + { + errlCommit(err, ATTN_COMP_ID); } } @@ -204,6 +189,8 @@ void ServiceCommon::processAttentions(const TargetHandleList & i_procs) { errlHndl_t err = NULL; AttentionList attentions; + // this should be the opposite of what we used for masking in preAck + uint64_t restoreMask = ~(HostMask::host() | HostMask::nonHost()); MemOps & memOps = getMemOps(); ProcOps & procOps = getProcOps(); @@ -263,11 +250,13 @@ void ServiceCommon::processAttentions(const TargetHandleList & i_procs) err = modifyScom( *pit, IPOLL::address, - ~HostMask::nonHost(), + restoreMask, SCOM_AND); mutex_unlock(&iv_mutex); + ATTN_TRACE("ProcessATTN:: IPOLL RESTORE :%llx", restoreMask ); + if(err) { errlCommit(err, ATTN_COMP_ID); -- cgit v1.2.1