Fix bugs around uni-coherence invalidates being propogated properly.
src/mem/bus.cc: Make it so that invalidates being sent from the responder up don't call the responder but they should also not Panic. src/mem/packet.hh: If we don't have data in the packet, don't call deleteData: Example: InvalidateRequests never have data. --HG-- extra : convert_revision : 18766bc9f3bb4d852ac651d094254d347abd1634
This commit is contained in:
parent
8155e61a60
commit
c32f3056f9
2 changed files with 26 additions and 18 deletions
|
@ -161,11 +161,11 @@ Bus::recvTiming(PacketPtr pkt)
|
||||||
short dest = pkt->getDest();
|
short dest = pkt->getDest();
|
||||||
if (dest == Packet::Broadcast) {
|
if (dest == Packet::Broadcast) {
|
||||||
port = findPort(pkt->getAddr(), pkt->getSrc());
|
port = findPort(pkt->getAddr(), pkt->getSrc());
|
||||||
if (timingSnoop(pkt, port)) {
|
if (timingSnoop(pkt, port ? port : interfaces[pkt->getSrc()])) {
|
||||||
bool success;
|
bool success;
|
||||||
|
|
||||||
pkt->flags |= SNOOP_COMMIT;
|
pkt->flags |= SNOOP_COMMIT;
|
||||||
success = timingSnoop(pkt, port);
|
success = timingSnoop(pkt, port ? port : interfaces[pkt->getSrc()]);
|
||||||
assert(success);
|
assert(success);
|
||||||
|
|
||||||
if (pkt->flags & SATISFIED) {
|
if (pkt->flags & SATISFIED) {
|
||||||
|
@ -192,6 +192,7 @@ Bus::recvTiming(PacketPtr pkt)
|
||||||
|
|
||||||
occupyBus(pkt);
|
occupyBus(pkt);
|
||||||
|
|
||||||
|
if (port) {
|
||||||
if (port->sendTiming(pkt)) {
|
if (port->sendTiming(pkt)) {
|
||||||
// Packet was successfully sent. Return true.
|
// Packet was successfully sent. Return true.
|
||||||
// Also take care of retries
|
// Also take care of retries
|
||||||
|
@ -208,6 +209,11 @@ Bus::recvTiming(PacketPtr pkt)
|
||||||
DPRINTF(Bus, "Adding a retry to RETRY list %i\n", pktPort);
|
DPRINTF(Bus, "Adding a retry to RETRY list %i\n", pktPort);
|
||||||
addToRetryList(pktPort);
|
addToRetryList(pktPort);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//Forwarding up from responder, just return true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -398,12 +404,14 @@ Bus::recvAtomic(PacketPtr pkt)
|
||||||
pkt->finishTime = curTick + clock;
|
pkt->finishTime = curTick + clock;
|
||||||
|
|
||||||
Port *port = findPort(pkt->getAddr(), pkt->getSrc());
|
Port *port = findPort(pkt->getAddr(), pkt->getSrc());
|
||||||
Tick snoopTime = atomicSnoop(pkt, port);
|
Tick snoopTime = atomicSnoop(pkt, port ? port : interfaces[pkt->getSrc()]);
|
||||||
|
|
||||||
if (snoopTime)
|
if (snoopTime)
|
||||||
return snoopTime; //Snoop satisfies it
|
return snoopTime; //Snoop satisfies it
|
||||||
else
|
else if (port)
|
||||||
return port->sendAtomic(pkt);
|
return port->sendAtomic(pkt);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function called by the port when the bus is receiving a Functional
|
/** Function called by the port when the bus is receiving a Functional
|
||||||
|
|
|
@ -301,7 +301,7 @@ class Packet
|
||||||
|
|
||||||
/** Destructor. */
|
/** Destructor. */
|
||||||
~Packet()
|
~Packet()
|
||||||
{ deleteData(); }
|
{ if (staticData || dynamicData) deleteData(); }
|
||||||
|
|
||||||
/** Reinitialize packet address and size from the associated
|
/** Reinitialize packet address and size from the associated
|
||||||
* Request object, and reset other fields that may have been
|
* Request object, and reset other fields that may have been
|
||||||
|
|
Loading…
Reference in a new issue