From: Ali Saidi Date: Thu, 1 Mar 2012 23:26:31 +0000 (-0600) Subject: Cache: Fix an issue with LRU when bonus block is used to complete transaction. X-Git-Tag: stable_2012_06_28~206 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d907d0ec723538c7969bf8f2f2d6f29439b02985;p=gem5.git Cache: Fix an issue with LRU when bonus block is used to complete transaction. The block is never inserted because it's the one extra block in the cache, but it can be invalidated twice in a row. In that case the block doesn't have a new master id (beacuse it was never inserted), however it is valid and the accounting goes wrong at that point. --- diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 40359d31e..024ae3297 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -994,6 +994,7 @@ Cache::handleResponse(PacketPtr pkt) if (blk->isDirty()) { allocateWriteBuffer(writebackBlk(blk), time, true); } + blk->status &= ~BlkValid; tags->invalidateBlk(blk); }