summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/base_set_assoc.hh
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2016-10-31 13:33:35 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-03-07 10:33:36 +0000
commit9bd467bf72854b613bb366e8adac75c9cfe883c3 (patch)
tree49cf3ea60a7598789541becf25bdec6397f9eba2 /src/mem/cache/tags/base_set_assoc.hh
parentf80e7c072fcac179b98dbbac8cc90dba68af9cf4 (diff)
downloadgem5-9bd467bf72854b613bb366e8adac75c9cfe883c3.tar.xz
mem-cache: Make invalidate a common function between tag classes
invalidate was defined as a separate function in the base associative and fully-associative tags classes although both functions should implement identical functionality. This patch moves the invalidate function in the base tags class. Change-Id: I206ee969b00ab9e05873c6d87531474fcd712907 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8286 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/tags/base_set_assoc.hh')
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 44f68d5fc..835b0cfd4 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014 ARM Limited
+ * Copyright (c) 2012-2014,2017 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -72,7 +72,6 @@
* BlkType* accessBlock();
* BlkType* findVictim();
* void insertBlock();
- * void invalidate();
*/
class BaseSetAssoc : public BaseTags
{
@@ -134,22 +133,6 @@ public:
CacheBlk *findBlockBySetAndWay(int set, int way) const override;
/**
- * Invalidate the given block.
- * @param blk The block to invalidate.
- */
- void invalidate(CacheBlk *blk) override
- {
- assert(blk);
- assert(blk->isValid());
- tagsInUse--;
- assert(blk->srcMasterId < cache->system->maxMasters());
- occupancies[blk->srcMasterId]--;
- blk->srcMasterId = Request::invldMasterId;
- blk->task_id = ContextSwitchTaskId::Unknown;
- blk->tickInserted = curTick();
- }
-
- /**
* Access block and update replacement data. May not succeed, in which case
* nullptr is returned. This has all the implications of a cache
* access and should only be used as such. Returns the access latency as a