changeset 59a7df953d5e in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=59a7df953d5e
description:
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:
src/mem/ruby/system/RubyPort.cc | 14 ++------------
src/mem/tport.cc | 10 ++++------
2 files changed, 6 insertions(+), 18 deletions(-)
diffs (44 lines):
diff -r 18755c467503 -r 59a7df953d5e src/mem/ruby/system/RubyPort.cc
--- a/src/mem/ruby/system/RubyPort.cc Mon Apr 22 13:20:33 2013 -0400
+++ b/src/mem/ruby/system/RubyPort.cc Mon Apr 22 13:20:33 2013 -0400
@@ -168,18 +168,8 @@
//dsm: based on SimpleTimingPort::recvTimingReq(pkt);
- // The received packets should only be M5 requests, which should never
- // get nacked. There used to be code to hanldle nacks here, but
- // I'm pretty sure it didn't work correctly with the drain code,
- // so that would need to be fixed if we ever added it back.
-
- if (pkt->memInhibitAsserted()) {
- warn("memInhibitAsserted???");
- // snooper will supply based on copy of packet
- // still target's responsibility to delete packet
- delete pkt;
- return true;
- }
+ if (pkt->memInhibitAsserted())
+ panic("RubyPort should never see an inhibited request\n");
// Save the port in the sender state object to be used later to
// route the response
diff -r 18755c467503 -r 59a7df953d5e src/mem/tport.cc
--- a/src/mem/tport.cc Mon Apr 22 13:20:33 2013 -0400
+++ b/src/mem/tport.cc Mon Apr 22 13:20:33 2013 -0400
@@ -68,12 +68,10 @@
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);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev