summaryrefslogtreecommitdiff
path: root/src/mem/cache/cache.cc
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-04-13 17:12:36 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-05-08 21:46:21 +0000
commit0b0629cda6cbb4fdc1c1087c762c27c426e8a1c9 (patch)
treedf68c654288b7bb55c496f84d71674d8d77b262b /src/mem/cache/cache.cc
parent376f1b2ff7034f4d084a087a68307b11042d2a9d (diff)
downloadgem5-0b0629cda6cbb4fdc1c1087c762c27c426e8a1c9.tar.xz
mem-cache: Create block insertion function
Create a block insertion function to be used when inserting blocks. This resets the number of references to 1 (the insertion is taken into account), sets the insertion tick, and set secure state. Change-Id: Ifc34cbbd1c125207ce47912d188809221c7a157e Reviewed-on: https://gem5-review.googlesource.com/9824 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/cache.cc')
-rw-r--r--src/mem/cache/cache.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index 28c4343d1..2d3ab8312 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -397,10 +397,7 @@ Cache::access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat,
}
tags->insertBlock(pkt, blk);
- blk->status = (BlkValid | BlkReadable);
- if (pkt->isSecure()) {
- blk->status |= BlkSecure;
- }
+ blk->status |= (BlkValid | BlkReadable);
}
// only mark the block dirty if we got a writeback command,
// and leave it as is for a clean writeback
@@ -460,10 +457,7 @@ Cache::access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat,
}
tags->insertBlock(pkt, blk);
- blk->status = (BlkValid | BlkReadable);
- if (pkt->isSecure()) {
- blk->status |= BlkSecure;
- }
+ blk->status |= (BlkValid | BlkReadable);
}
}