summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmin Farmahini <aminfar@gmail.com>2014-01-28 18:00:50 -0600
committerAmin Farmahini <aminfar@gmail.com>2014-01-28 18:00:50 -0600
commitffbdaa7cce32bfb18f0c97b9c5f19d1aa54da503 (patch)
tree8719d8b83bf57b012d3417d956e440a86726f9df
parent575a73f4a11432e11167537fb301dfc5d088810f (diff)
downloadgem5-ffbdaa7cce32bfb18f0c97b9c5f19d1aa54da503.tar.xz
mem: Remove redundant findVictim() input argument
The patch (1) removes the redundant writeback argument from findVictim() (2) fixes the description of access() function Committed by: Nilay Vaish <nilay@cs.wisc.edu>
-rw-r--r--src/mem/cache/cache.hh2
-rw-r--r--src/mem/cache/cache_impl.hh2
-rw-r--r--src/mem/cache/tags/fa_lru.cc2
-rw-r--r--src/mem/cache/tags/fa_lru.hh3
-rw-r--r--src/mem/cache/tags/lru.cc2
-rw-r--r--src/mem/cache/tags/lru.hh3
6 files changed, 6 insertions, 8 deletions
diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh
index 60f3650e7..3d7fc8fe3 100644
--- a/src/mem/cache/cache.hh
+++ b/src/mem/cache/cache.hh
@@ -195,9 +195,9 @@ class Cache : public BaseCache
/**
* Does all the processing necessary to perform the provided request.
* @param pkt The memory request to perform.
+ * @param blk The cache block to be updated.
* @param lat The latency of the access.
* @param writebacks List for any writebacks that need to be performed.
- * @param update True if the replacement data should be updated.
* @return Boolean indicating whether the request was satisfied.
*/
bool access(PacketPtr pkt, BlkType *&blk,
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index acd3ef64f..b26473336 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -1192,7 +1192,7 @@ typename Cache<TagStore>::BlkType*
Cache<TagStore>::allocateBlock(Addr addr, bool is_secure,
PacketList &writebacks)
{
- BlkType *blk = tags->findVictim(addr, writebacks);
+ BlkType *blk = tags->findVictim(addr);
if (blk->isValid()) {
Addr repl_addr = tags->regenerateBlkAddr(blk->tag, blk->set);
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index c3e2b66e4..6526aadb8 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -224,7 +224,7 @@ FALRU::findBlock(Addr addr, bool is_secure) const
}
FALRUBlk*
-FALRU::findVictim(Addr addr, PacketList &writebacks)
+FALRU::findVictim(Addr addr)
{
FALRUBlk * blk = tail;
assert(blk->inCache == 0);
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 1465bd861..ef13b2c79 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -203,10 +203,9 @@ public:
/**
* Find a replacement block for the address provided.
* @param pkt The request to a find a replacement candidate for.
- * @param writebacks List for any writebacks to be performed.
* @return The block to place the replacement in.
*/
- FALRUBlk* findVictim(Addr addr, PacketList & writebacks);
+ FALRUBlk* findVictim(Addr addr);
void insertBlock(PacketPtr pkt, BlkType *blk);
diff --git a/src/mem/cache/tags/lru.cc b/src/mem/cache/tags/lru.cc
index ff0596987..744d7224a 100644
--- a/src/mem/cache/tags/lru.cc
+++ b/src/mem/cache/tags/lru.cc
@@ -172,7 +172,7 @@ LRU::findBlock(Addr addr, bool is_secure) const
}
LRU::BlkType*
-LRU::findVictim(Addr addr, PacketList &writebacks)
+LRU::findVictim(Addr addr)
{
unsigned set = extractSet(addr);
// grab a replacement candidate
diff --git a/src/mem/cache/tags/lru.hh b/src/mem/cache/tags/lru.hh
index 9d438497a..121bdb292 100644
--- a/src/mem/cache/tags/lru.hh
+++ b/src/mem/cache/tags/lru.hh
@@ -169,10 +169,9 @@ public:
/**
* Find a block to evict for the address provided.
* @param addr The addr to a find a replacement candidate for.
- * @param writebacks List for any writebacks to be performed.
* @return The candidate block.
*/
- BlkType* findVictim(Addr addr, PacketList &writebacks);
+ BlkType* findVictim(Addr addr);
/**
* Insert the new block into the cache. For LRU this means inserting into