changeset 1342b4dbc556 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=1342b4dbc556
description:
        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 <[email protected]>
        Signed-off-by: Andreas Sandberg <[email protected]>

diffstat:

 src/mem/cache/cache.cc |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 8732d8d0a9e5 -r 1342b4dbc556 src/mem/cache/cache.cc
--- a/src/mem/cache/cache.cc    Tue Feb 21 14:14:44 2017 +0000
+++ b/src/mem/cache/cache.cc    Tue Feb 21 14:14:44 2017 +0000
@@ -305,8 +305,7 @@
                 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 @@
 
         tempBlockWriteback = (blk->isDirty() || writebackClean) ?
             writebackBlk(blk) : cleanEvictBlk(blk);
-        blk->invalidate();
+        invalidateBlock(blk);
     }
 
     if (pkt->needsResponse()) {
@@ -1531,7 +1530,7 @@
             else
                 allocateWriteBuffer(wcPkt, forward_time);
         }
-        blk->invalidate();
+        invalidateBlock(blk);
     }
 
     DPRINTF(CacheVerbose, "%s: Leaving with %s\n", __func__, pkt->print());
@@ -1660,8 +1659,7 @@
 
     if (blk.isValid()) {
         assert(!blk.isDirty());
-        tags->invalidate(&blk);
-        blk.invalidate();
+        invalidateBlock(&blk);
     }
 
     return true;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to