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:
committed by
Daniel Carvalho
parent
5bb8643808
commit
285a919dc1
2
src/mem/cache/tags/base.cc
vendored
2
src/mem/cache/tags/base.cc
vendored
@@ -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());
|
||||
|
||||
|
||||
2
src/mem/cache/tags/base.hh
vendored
2
src/mem/cache/tags/base.hh
vendored
@@ -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.
|
||||
|
||||
2
src/mem/cache/tags/base_set_assoc.hh
vendored
2
src/mem/cache/tags/base_set_assoc.hh
vendored
@@ -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);
|
||||
|
||||
2
src/mem/cache/tags/fa_lru.cc
vendored
2
src/mem/cache/tags/fa_lru.cc
vendored
@@ -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);
|
||||
|
||||
|
||||
2
src/mem/cache/tags/fa_lru.hh
vendored
2
src/mem/cache/tags/fa_lru.hh
vendored
@@ -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
|
||||
|
||||
2
src/mem/cache/tags/sector_tags.cc
vendored
2
src/mem/cache/tags/sector_tags.cc
vendored
@@ -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);
|
||||
|
||||
2
src/mem/cache/tags/sector_tags.hh
vendored
2
src/mem/cache/tags/sector_tags.hh
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user