summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2017-02-21 14:14:44 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2017-02-21 14:14:44 +0000
commita063a149059236dfee608b478042a6ce65a0d902 (patch)
tree0ea1c06ed5dbbede13506391733b1b844d26b94f /src
parent46b4c402779cd8fa37bde8de0069b80bfdaa8454 (diff)
downloadgem5-a063a149059236dfee608b478042a6ce65a0d902.tar.xz
mem: Always use the helper function to invalidate a block
Policies like the LRU need to be notified when a block is invalidated, the helper function does this along with invalidating the block. Change-Id: I3ed59cf07938caa7f394ee6054b0af9e00b267ea Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/cache.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index 95fa57a6e..05fb48734 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -305,8 +305,7 @@ Cache::access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat,
writebacks.push_back(writebackBlk(old_blk));
else
writebacks.push_back(cleanEvictBlk(old_blk));
- tags->invalidate(old_blk);
- old_blk->invalidate();
+ invalidateBlock(old_blk);
}
blk = nullptr;
@@ -1127,7 +1126,7 @@ Cache::recvAtomic(PacketPtr pkt)
tempBlockWriteback = (blk->isDirty() || writebackClean) ?
writebackBlk(blk) : cleanEvictBlk(blk);
- blk->invalidate();
+ invalidateBlock(blk);
}
if (pkt->needsResponse()) {
@@ -1531,7 +1530,7 @@ Cache::recvTimingResp(PacketPtr pkt)
else
allocateWriteBuffer(wcPkt, forward_time);
}
- blk->invalidate();
+ invalidateBlock(blk);
}
DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print());
@@ -1660,8 +1659,7 @@ Cache::invalidateVisitor(CacheBlk &blk)
if (blk.isValid()) {
assert(!blk.isDirty());
- tags->invalidate(&blk);
- blk.invalidate();
+ invalidateBlock(&blk);
}
return true;