summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
authorJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
committerJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
commitd9f0a8288e0522369928fec76a7d8b70e2b719eb (patch)
tree42da337edb675b3ae51f0af40bc621f198798e72 /src/dev
parent02b05bf9be2fa4cf5aae2a3a989ac27d675b0a50 (diff)
downloadgem5-d9f0a8288e0522369928fec76a7d8b70e2b719eb.tar.xz
MessagePort: implement the virtual recvTiming function to avoid double pkt delete
Double packet delete problem is due to an interrupt device deleting a packet that the SimpleTimingPort also deletes. Since MessagePort descends from SimpleTimingPort, simply reimplement the failing code from SimpleTimingPort: recvTiming.
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/x86/intdev.cc8
-rw-r--r--src/dev/x86/intdev.hh2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/dev/x86/intdev.cc b/src/dev/x86/intdev.cc
index 5bc6065f5..0d392d5ee 100644
--- a/src/dev/x86/intdev.cc
+++ b/src/dev/x86/intdev.cc
@@ -37,10 +37,14 @@ X86ISA::IntDev::IntPort::sendMessage(ApicList apics,
ApicList::iterator apicIt;
for (apicIt = apics.begin(); apicIt != apics.end(); apicIt++) {
PacketPtr pkt = buildIntRequest(*apicIt, message);
- if (timing)
+ if (timing) {
sendMessageTiming(pkt, latency);
- else
+ // The target handles cleaning up the packet in timing mode.
+ } else {
sendMessageAtomic(pkt);
+ delete pkt->req;
+ delete pkt;
+ }
}
}
diff --git a/src/dev/x86/intdev.hh b/src/dev/x86/intdev.hh
index b01d36e37..61e486718 100644
--- a/src/dev/x86/intdev.hh
+++ b/src/dev/x86/intdev.hh
@@ -138,8 +138,6 @@ class IntDev
virtual Tick
recvResponse(PacketPtr pkt)
{
- delete pkt->req;
- delete pkt;
return 0;
}