summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/base.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/tags/base.hh')
-rw-r--r--src/mem/cache/tags/base.hh15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index 9714d9aa2..dfd8aeb62 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014,2016 ARM Limited
+ * Copyright (c) 2012-2014,2016-2017 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -236,7 +236,18 @@ class BaseTags : public ClockedObject
return -1;
}
- virtual void invalidate(CacheBlk *blk) = 0;
+ /**
+ * This function updates the tags when a block is invalidated but
+ * does not invalidate the block itself.
+ * @param blk The block to invalidate.
+ */
+ virtual void invalidate(CacheBlk *blk)
+ {
+ assert(blk);
+ assert(blk->isValid());
+ tagsInUse--;
+ occupancies[blk->srcMasterId]--;
+ }
virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0;