Mem: fix master id assertion in cache_impl.hh
authorDam Sunwoo <dam.sunwoo@arm.com>
Fri, 29 Jun 2012 15:19:07 +0000 (11:19 -0400)
committerDam Sunwoo <dam.sunwoo@arm.com>
Fri, 29 Jun 2012 15:19:07 +0000 (11:19 -0400)
The assertion was applied to the wrong packet.
This patch fixes the issue rerported by Xiang Jiang on the gem5-dev mailing list.

src/mem/cache/cache_impl.hh

index 2329b2ea6d1b24a231df663babb9d8822d4515a3..af32346bb9543c144a6d1fb41a8fec8099c5254b 100644 (file)
@@ -903,7 +903,7 @@ Cache<TagStore>::handleResponse(PacketPtr pkt)
 
                 assert(!target->pkt->req->isUncacheable());
 
-                assert(pkt->req->masterId() < system->maxMasters());
+                assert(target->pkt->req->masterId() < system->maxMasters());
                 missLatency[target->pkt->cmdToIndex()][target->pkt->req->masterId()] +=
                     completion_time - target->recvTime;
             } else if (pkt->cmd == MemCmd::UpgradeFailResp) {