changeset 83bb6e381cbf in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=83bb6e381cbf
description:
mem: Fix incorrect assert failure in the Cache
This patch fixes an assert condition that is not true at all
times. There are valid situations that arise in dual-core
dual-workload runs where the assert condition is false. The function
call following the assert however needs to be called only when the
condition is true (a block cannot be invalidated in the tags structure
if has not been allocated in the structure, and the tempBlock is never
allocated). Hence the 'assert' has been replaced with an 'if'.
diffstat:
src/mem/cache/cache_impl.hh | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 524afa92d940 -r 83bb6e381cbf src/mem/cache/cache_impl.hh
--- a/src/mem/cache/cache_impl.hh Fri Mar 07 15:56:23 2014 -0500
+++ b/src/mem/cache/cache_impl.hh Fri Mar 07 15:56:23 2014 -0500
@@ -183,8 +183,8 @@
pkt->assertMemInhibit();
}
// on ReadExReq we give up our copy unconditionally
- assert(blk != tempBlock);
- tags->invalidate(blk);
+ if (blk != tempBlock)
+ tags->invalidate(blk);
blk->invalidate();
} else if (blk->isWritable() && !pending_downgrade
&& !pkt->sharedAsserted() && !pkt->req->isInstFetch()) {
@@ -1456,8 +1456,8 @@
// Do this last in case it deallocates block data or something
// like that
if (invalidate) {
- assert(blk != tempBlock);
- tags->invalidate(blk);
+ if (blk != tempBlock)
+ tags->invalidate(blk);
blk->invalidate();
}
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev