mem-cache: Fix fix of replacement count
authorDaniel <odanrc@yahoo.com.br>
Mon, 22 Apr 2019 09:32:22 +0000 (11:32 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 22 Apr 2019 22:17:10 +0000 (22:17 +0000)
commit382263c6706296fee2548f74fd4b811553106dba
tree28c21239e815f9f54adf9108afc0166b2ebaaec4
parent620d1c6f72733e87062a51c5f9d3e7fd6324f543
mem-cache: Fix fix of replacement count

Commit 7976b561de61b7523ca9a860154ad7ba701d12a7 tried fixing
replacement update when a single location can be associated to
multiple blocks.

Although the comment of the correct action was added, the proper
validation check was forgotten. This change adds that check and
moves doing the eviction to when there is a valid block.

Change-Id: I31d8bb914ccfd1849e9d97464d70a58a62f59533
Signed-off-by: Daniel <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18210
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/base.cc