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>
This commit is contained in:
Daniel R. Carvalho
2018-06-06 15:26:10 +02:00
committed by Daniel Carvalho
parent 5bb8643808
commit 285a919dc1
7 changed files with 7 additions and 7 deletions

View File

@@ -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());

View File

@@ -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.

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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);

View File

@@ -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.