From: Ali Saidi Date: Wed, 13 Aug 2008 20:30:30 +0000 (-0400) Subject: More subtle fixes to how interrupts are supposed to work in the device. Fix postedInt... X-Git-Tag: m5_2.0_beta6~55 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05954e1ba7bb35674b0d12428788998d699f25cb;p=gem5.git More subtle fixes to how interrupts are supposed to work in the device. Fix postedInterrupts statistics. --- diff --git a/src/dev/i8254xGBe.cc b/src/dev/i8254xGBe.cc index 76e11b752..98040a252 100644 --- a/src/dev/i8254xGBe.cc +++ b/src/dev/i8254xGBe.cc @@ -588,7 +588,6 @@ IGbE::postInterrupt(IntTypes t, bool now) if (interEvent.scheduled()) { interEvent.deschedule(); } - postedInterrupts++; cpuPostInt(); } else { Tick int_time = lastInterrupt + itr_interval; @@ -612,6 +611,8 @@ void IGbE::cpuPostInt() { + postedInterrupts++; + if (!(regs.icr() & regs.imr)) { DPRINTF(Ethernet, "Interrupt Masked. Not Posting\n"); return; diff --git a/src/dev/i8254xGBe.hh b/src/dev/i8254xGBe.hh index a69793bd4..de73eda79 100644 --- a/src/dev/i8254xGBe.hh +++ b/src/dev/i8254xGBe.hh @@ -87,7 +87,7 @@ class IGbE : public EtherDevice void rdtrProcess() { rxDescCache.writeback(0); DPRINTF(EthernetIntr, "Posting RXT interrupt because RDTR timer expired\n"); - postInterrupt(iGbReg::IT_RXT, true); + postInterrupt(iGbReg::IT_RXT); } //friend class EventWrapper; @@ -97,7 +97,7 @@ class IGbE : public EtherDevice void radvProcess() { rxDescCache.writeback(0); DPRINTF(EthernetIntr, "Posting RXT interrupt because RADV timer expired\n"); - postInterrupt(iGbReg::IT_RXT, true); + postInterrupt(iGbReg::IT_RXT); } //friend class EventWrapper; @@ -107,7 +107,7 @@ class IGbE : public EtherDevice void tadvProcess() { txDescCache.writeback(0); DPRINTF(EthernetIntr, "Posting TXDW interrupt because TADV timer expired\n"); - postInterrupt(iGbReg::IT_TXDW, true); + postInterrupt(iGbReg::IT_TXDW); } //friend class EventWrapper; @@ -117,7 +117,7 @@ class IGbE : public EtherDevice void tidvProcess() { txDescCache.writeback(0); DPRINTF(EthernetIntr, "Posting TXDW interrupt because TIDV timer expired\n"); - postInterrupt(iGbReg::IT_TXDW, true); + postInterrupt(iGbReg::IT_TXDW); } //friend class EventWrapper; EventWrapper tidvEvent;