small bus updates for functional accesses
authorAli Saidi <saidi@eecs.umich.edu>
Thu, 12 Oct 2006 19:02:25 +0000 (15:02 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Thu, 12 Oct 2006 19:02:25 +0000 (15:02 -0400)
--HG--
extra : convert_revision : c7a6b199c74ed4b4ffab14bbffb51e72d75b7742

src/mem/bus.cc

index 75ffed0d2d5cef4d69b0613319938be50e401346..b11b6de58e1fd0874b7ec7650f08ee640ff92988 100644 (file)
@@ -320,7 +320,7 @@ Bus::functionalSnoop(Packet *pkt)
 {
     std::vector<int> ports = findSnoopPorts(pkt->getAddr(), pkt->getSrc());
 
-    while (!ports.empty())
+    while (!ports.empty() && pkt->result != Packet::Success)
     {
         interfaces[ports.back()]->sendFunctional(pkt);
         ports.pop_back();
@@ -367,7 +367,10 @@ Bus::recvFunctional(Packet *pkt)
             pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString());
     assert(pkt->getDest() == Packet::Broadcast);
     functionalSnoop(pkt);
-    findPort(pkt->getAddr(), pkt->getSrc())->sendFunctional(pkt);
+
+    // If the snooping found what we were looking for, we're done.
+    if (pkt->result != Packet::Success)
+        findPort(pkt->getAddr(), pkt->getSrc())->sendFunctional(pkt);
 }
 
 /** Function called by the port when the bus is receiving a status change.*/