summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/cache/cache_impl.hh21
-rw-r--r--src/mem/packet.hh9
2 files changed, 16 insertions, 14 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index ab475445e..538f1632b 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -1651,11 +1651,11 @@ Cache<TagStore>::handleSnoop(PacketPtr pkt, BlkType *blk,
if (snoopPkt.sharedAsserted()) {
pkt->assertShared();
}
- // If this request is a prefetch and an
- // upper level squashes the prefetch request,
- // make sure to propogate the squash to the requester.
- if (snoopPkt.prefetchSquashed()) {
- pkt->setPrefetchSquashed();
+ // If this request is a prefetch or clean evict and an
+ // upper level signals block present, make sure to
+ // propagate the block presence to the requester.
+ if (snoopPkt.isBlockCached()) {
+ pkt->setBlockCached();
}
} else {
cpuSidePort->sendAtomicSnoop(pkt);
@@ -1695,7 +1695,7 @@ Cache<TagStore>::handleSnoop(PacketPtr pkt, BlkType *blk,
if (pkt->cmd == MemCmd::HardPFReq) {
DPRINTF(Cache, "Squashing prefetch from lower cache %#x\n",
pkt->getAddr());
- pkt->setPrefetchSquashed();
+ pkt->setBlockCached();
return;
}
@@ -1789,9 +1789,10 @@ Cache<TagStore>::recvTimingSnoopReq(PacketPtr pkt)
// Squash any prefetch requests from below on MSHR hits
if (mshr && pkt->cmd == MemCmd::HardPFReq) {
- DPRINTF(Cache, "Squashing prefetch from lower cache on mshr hit %#x\n",
+ DPRINTF(Cache, "Setting block present to squash prefetch from"
+ "lower cache on mshr hit %#x\n",
pkt->getAddr());
- pkt->setPrefetchSquashed();
+ pkt->setBlockCached();
return;
}
@@ -2022,8 +2023,8 @@ Cache<TagStore>::getTimingPacket()
return NULL;
}
- if (snoop_pkt.prefetchSquashed() || blk != NULL) {
- DPRINTF(Cache, "Prefetch squashed by cache. "
+ if (snoop_pkt.isBlockCached() || blk != NULL) {
+ DPRINTF(Cache, "Block present, prefetch squashed by cache. "
"Deallocating mshr target %#x.\n", mshr->addr);
// Deallocate the mshr target
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 8badc7c73..10a4f7e89 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -261,8 +261,9 @@ class Packet : public Printable
/// suppress the error if this packet encounters a functional
/// access failure.
static const FlagsType SUPPRESS_FUNC_ERROR = 0x00008000;
- // Signal prefetch squash through express snoop flag
- static const FlagsType PREFETCH_SNOOP_SQUASH = 0x00010000;
+ // Signal block present to squash prefetch and cache evict packets
+ // through express snoop flag
+ static const FlagsType BLOCK_CACHED = 0x00010000;
Flags flags;
@@ -505,8 +506,8 @@ class Packet : public Printable
bool isSupplyExclusive() const { return flags.isSet(SUPPLY_EXCLUSIVE); }
void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
- void setPrefetchSquashed() { flags.set(PREFETCH_SNOOP_SQUASH); }
- bool prefetchSquashed() const { return flags.isSet(PREFETCH_SNOOP_SQUASH); }
+ void setBlockCached() { flags.set(BLOCK_CACHED); }
+ bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
// Network error conditions... encapsulate them as methods since
// their encoding keeps changing (from result field to command