Cache: Only invalidate a line in the cache when an uncacheable write is seen.
authorAli Saidi <Ali.Saidi@ARM.com>
Fri, 29 Jun 2012 15:18:29 +0000 (11:18 -0400)
committerAli Saidi <Ali.Saidi@ARM.com>
Fri, 29 Jun 2012 15:18:29 +0000 (11:18 -0400)
src/mem/cache/cache_impl.hh

index fec0a622232bb8846e4032637dec6951e5743b6e..2329b2ea6d1b24a231df663babb9d8822d4515a3 100644 (file)
@@ -275,7 +275,7 @@ Cache<TagStore>::access(PacketPtr pkt, BlkType *&blk,
     if (pkt->req->isUncacheable()) {
         if (pkt->req->isClearLL()) {
             tags->clearLocks();
-        } else {
+        } else if (pkt->isWrite()) {
            blk = tags->findBlock(pkt->getAddr());
            if (blk != NULL) {
                tags->invalidateBlk(blk);
@@ -439,7 +439,7 @@ Cache<TagStore>::timingAccess(PacketPtr pkt)
     if (pkt->req->isUncacheable()) {
         if (pkt->req->isClearLL()) {
             tags->clearLocks();
-        } else {
+        } else if (pkt->isWrite()) {
             BlkType *blk = tags->findBlock(pkt->getAddr());
             if (blk != NULL) {
                 tags->invalidateBlk(blk);