summaryrefslogtreecommitdiff
path: root/src/mem/tport.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-04-22 13:20:33 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-04-22 13:20:33 -0400
commit9929e884b6fe6567c3bd2fe2dd3bba85d4e9bbd1 (patch)
tree3acd72561781f7854f7eee2c47fcbfd6e3828f6a /src/mem/tport.cc
parentd69f904a18593f75efcb0555b2bd092574181160 (diff)
downloadgem5-9929e884b6fe6567c3bd2fe2dd3bba85d4e9bbd1.tar.xz
mem: Replace check with panic where inhibited should not happen
This patch changes the SimpleTimingPort and RubyPort to panic on inhibited requests as this should never happen in either of the cases. The SimpleTimingPort is only used for the I/O devices PIO port and the DMA devices config port and should thus never see an inhibited request. Similarly, the SimpleTimingPort is also used for the MessagePort in x86, and there should also not be any cases where the port sees an inhibited request.
Diffstat (limited to 'src/mem/tport.cc')
-rw-r--r--src/mem/tport.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mem/tport.cc b/src/mem/tport.cc
index 7a0dd7cd9..4408b59ba 100644
--- a/src/mem/tport.cc
+++ b/src/mem/tport.cc
@@ -68,12 +68,10 @@ SimpleTimingPort::recvTimingReq(PacketPtr pkt)
delete pendingDelete[x];
pendingDelete.clear();
- if (pkt->memInhibitAsserted()) {
- // snooper will supply based on copy of packet
- // still target's responsibility to delete packet
- delete pkt;
- return true;
- }
+ // the SimpleTimingPort should not be used anywhere where there is
+ // a need to deal with inhibited packets
+ if (pkt->memInhibitAsserted())
+ panic("SimpleTimingPort should never see an inhibited request\n");
bool needsResponse = pkt->needsResponse();
Tick latency = recvAtomic(pkt);