summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-06-06 15:26:10 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-06-13 07:58:00 +0000
commit285a919dc1067c32e5eac22aaa805f62beaac6c4 (patch)
tree91af45be9b8b803a74743b386a1e38be7cc81b00
parent5bb8643808e81412ef634c142a9a403032d9141f (diff)
downloadgem5-285a919dc1067c32e5eac22aaa805f62beaac6c4.tar.xz
mem-cache: Make packet const in insertBlock
The packet should not be modified within insertBlock. Change-Id: If7d2b01fe131f9923194efd155c9e85eeab24d5a Reviewed-on: https://gem5-review.googlesource.com/10811 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
-rw-r--r--src/mem/cache/tags/base.cc2
-rw-r--r--src/mem/cache/tags/base.hh2
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh2
-rw-r--r--src/mem/cache/tags/fa_lru.cc2
-rw-r--r--src/mem/cache/tags/fa_lru.hh2
-rw-r--r--src/mem/cache/tags/sector_tags.cc2
-rw-r--r--src/mem/cache/tags/sector_tags.hh2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc
index caed594b8..9548d491a 100644
--- a/src/mem/cache/tags/base.cc
+++ b/src/mem/cache/tags/base.cc
@@ -80,7 +80,7 @@ BaseTags::setCache(BaseCache *_cache)
}
void
-BaseTags::insertBlock(PacketPtr pkt, CacheBlk *blk)
+BaseTags::insertBlock(const PacketPtr pkt, CacheBlk *blk)
{
assert(!blk->isValid());
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index 7ed90fbd9..30da40855 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -287,7 +287,7 @@ class BaseTags : public ClockedObject
* @param pkt Packet holding the address to update
* @param blk The block to update.
*/
- virtual void insertBlock(PacketPtr pkt, CacheBlk *blk);
+ virtual void insertBlock(const PacketPtr pkt, CacheBlk *blk);
/**
* Regenerate the block address.
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 12b2efb2f..61a16584f 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -248,7 +248,7 @@ class BaseSetAssoc : public BaseTags
* @param pkt Packet holding the address to update
* @param blk The block to update.
*/
- void insertBlock(PacketPtr pkt, CacheBlk *blk) override
+ void insertBlock(const PacketPtr pkt, CacheBlk *blk) override
{
// Insert block
BaseTags::insertBlock(pkt, blk);
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 3a60e99f9..bcf785e27 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -208,7 +208,7 @@ FALRU::findVictim(Addr addr, const bool is_secure,
}
void
-FALRU::insertBlock(PacketPtr pkt, CacheBlk *blk)
+FALRU::insertBlock(const PacketPtr pkt, CacheBlk *blk)
{
FALRUBlk* falruBlk = static_cast<FALRUBlk*>(blk);
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 7aec36a61..dee1af028 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -212,7 +212,7 @@ class FALRU : public BaseTags
* @param pkt Packet holding the address to update
* @param blk The block to update.
*/
- void insertBlock(PacketPtr pkt, CacheBlk *blk) override;
+ void insertBlock(const PacketPtr pkt, CacheBlk *blk) override;
/**
* Generate the tag from the addres. For fully associative this is just the
diff --git a/src/mem/cache/tags/sector_tags.cc b/src/mem/cache/tags/sector_tags.cc
index 27e89829d..cec7bd413 100644
--- a/src/mem/cache/tags/sector_tags.cc
+++ b/src/mem/cache/tags/sector_tags.cc
@@ -194,7 +194,7 @@ SectorTags::getPossibleLocations(Addr addr) const
}
void
-SectorTags::insertBlock(PacketPtr pkt, CacheBlk *blk)
+SectorTags::insertBlock(const PacketPtr pkt, CacheBlk *blk)
{
// Insert block
BaseTags::insertBlock(pkt, blk);
diff --git a/src/mem/cache/tags/sector_tags.hh b/src/mem/cache/tags/sector_tags.hh
index 3fc8ae476..d0dc1f7e3 100644
--- a/src/mem/cache/tags/sector_tags.hh
+++ b/src/mem/cache/tags/sector_tags.hh
@@ -152,7 +152,7 @@ class SectorTags : public BaseTags
* @param pkt Packet holding the address to update
* @param blk The block to update.
*/
- void insertBlock(PacketPtr pkt, CacheBlk *blk) override;
+ void insertBlock(const PacketPtr pkt, CacheBlk *blk) override;
/**
* Finds the given address in the cache, do not update replacement data.