summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/base_set_assoc.hh
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2014-08-13 06:57:24 -0400
committerMitch Hayenga <mitch.hayenga@arm.com>2014-08-13 06:57:24 -0400
commitf6f6ae461ee5060127fd42830fc04e5a5f4153a6 (patch)
treeaf9ff66acfa3c84a866a39e2c7dc9ca829024391 /src/mem/cache/tags/base_set_assoc.hh
parent66904b9584e09a9b6b6cb382ba208ec9a527edbe (diff)
downloadgem5-f6f6ae461ee5060127fd42830fc04e5a5f4153a6.tar.xz
mem: Properly set cache block status fields on writebacks
When a cacheline is written back to a lower-level cache, tags->insertBlock() sets various status parameters. However these status bits were cleared immediately after calling. This patch makes it so that these status fields are not cleared by moving them outside of the tags->insertBlock() call.
Diffstat (limited to 'src/mem/cache/tags/base_set_assoc.hh')
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 218d9cdd9..ac575d2ff 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -247,7 +247,7 @@ public:
Addr addr = pkt->getAddr();
MasterID master_id = pkt->req->masterId();
uint32_t task_id = pkt->req->taskId();
- bool is_secure = pkt->isSecure();
+
if (!blk->isTouched) {
tagsInUse++;
blk->isTouched = true;
@@ -275,10 +275,9 @@ public:
}
blk->isTouched = true;
+
// Set tag for new block. Caller is responsible for setting status.
blk->tag = extractTag(addr);
- if (is_secure)
- blk->status |= BlkSecure;
// deal with what we are bringing in
assert(master_id < cache->system->maxMasters());