summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/attn
diff options
context:
space:
mode:
authorBrian Stegmiller <bjs@us.ibm.com>2016-10-27 15:50:31 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2016-10-28 15:53:36 -0400
commit82533df4b535112204b62bdc3940aa81a057b896 (patch)
treef13eb8379e710d58abc7af1fc118cdf9443abc25 /src/usr/diag/attn
parent98fe6cc0bfa0e60a8475a8512820d13074f3c871 (diff)
downloadtalos-hostboot-82533df4b535112204b62bdc3940aa81a057b896.tar.gz
talos-hostboot-82533df4b535112204b62bdc3940aa81a057b896.zip
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 <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag/attn')
-rw-r--r--src/usr/diag/attn/common/attnsvc_common.C55
1 files changed, 22 insertions, 33 deletions
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);
OpenPOWER on IntegriCloud