diff options
author | Ali Jafri <ali.jafri@arm.com> | 2015-03-27 04:55:54 -0400 |
---|---|---|
committer | Ali Jafri <ali.jafri@arm.com> | 2015-03-27 04:55:54 -0400 |
commit | 15f0d9ff1441886eb6431544d9d3571f56a14840 (patch) | |
tree | cdc598808659d1839bc3d382f613394d1e3b632e /src/mem/cache | |
parent | a1164154ded6c1fa3c6a94f38abfcf96aefc20aa (diff) | |
download | gem5-15f0d9ff1441886eb6431544d9d3571f56a14840.tar.xz |
mem: Rename PREFETCH_SNOOP_SQUASH flag to BLOCK_CACHED
This patch subsumes the PREFETCH_SNOOP_SQUASH flag with the more
generic BLOCK_CACHED flag. Future patches implementing cache eviction
messages can use the BLOCK_CACHED flag in almost the same manner as
hardware prefetches use the PREFETCH_SNOOP_SQUASH flag. The
PREFTECH_SNOOP_FLAG is set if the prefetch target is found in the tags
or the MSHRs in any state, so we are simply replacing calls to
setPrefetchSquashed() with setBlockCached(). The case of where the
prefetch target is found in the writeback MSHRs of upper level caches
continues to be covered by the MEM_INHIBIT flag.
Diffstat (limited to 'src/mem/cache')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 21 |
1 files changed, 11 insertions, 10 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 |