Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/13210
Change subject: mem-cache: Fix FALRU hash invalidation
......................................................................
mem-cache: Fix FALRU hash invalidation
The block was being invalidated before the hash could erase
its entry, therefore it was using invalid values (tag was
being assigned MaxAddr and the secure bit was reset).
This change reorders the calls, so that the appropriate hash
entry is erased.
Change-Id: I161463df0f8f5220179bc68d7be12051e5390d01
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/mem/cache/tags/fa_lru.cc
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 2abe90c..8c7923f 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2018 Inria
* Copyright (c) 2013,2016-2018 ARM Limited
* All rights reserved.
*
@@ -39,6 +40,7 @@
*
* Authors: Erik Hallnor
* Nikos Nikoleris
+ * Daniel Carvalho
*/
/**
@@ -108,6 +110,10 @@
void
FALRU::invalidate(CacheBlk *blk)
{
+ // Erase block entry reference in the hash table
+ tagHash.erase(std::make_pair(blk->tag, blk->isSecure()));
+
+ // Invalidate block entry. Must be done after the hash is erased
BaseTags::invalidate(blk);
// Decrease the number of tags in use
@@ -115,9 +121,6 @@
// Move the block to the tail to make it the next victim
moveToTail((FALRUBlk*)blk);
-
- // Erase block entry in the hash table
- tagHash.erase(std::make_pair(blk->tag, blk->isSecure()));
}
CacheBlk*
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13210
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I161463df0f8f5220179bc68d7be12051e5390d01
Gerrit-Change-Number: 13210
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev