From: Nikos Nikoleris Date: Mon, 5 Dec 2016 21:48:27 +0000 (-0500) Subject: mem: Allow non invalidating snoops on an InvalidateReq MSHR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77dfeb8c09a63e38b215a0140a11377889cf4558;p=gem5.git mem: Allow non invalidating snoops on an InvalidateReq MSHR This patch changes an assertion that previously assumed that a non invalidating snoop request should never be serviced by an InvalidateReq MSHR. The MSHR serves as the ordering point for the snooping packet. When the InvalidateResp reaches the cache the snooping packet snoops the caches above to find the requested block. One or more of the caches above will have the block since earlier it has seen a WriteLineReq. Change-Id: I0c147c8b5d5019e18bd34adf9af0fccfe431ae07 Reviewed-by: Andreas Hansson --- diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index 48382814f..e139b54a2 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -1437,7 +1437,18 @@ Cache::recvTimingResp(PacketPtr pkt) assert(!is_error); // response to snoop request DPRINTF(Cache, "processing deferred snoop...\n"); - assert(!(is_invalidate && !mshr->hasPostInvalidate())); + // If the response is invalidating, a snooping target can + // be satisfied if it is also invalidating. If the reponse is, not + // only invalidating, but more specifically an InvalidateResp, the + // MSHR was created due to an InvalidateReq and a cache above is + // waiting to satisfy a WriteLineReq. In this case even an + // non-invalidating snoop is added as a target here since this is + // the ordering point. When the InvalidateResp reaches this cache, + // the snooping target will snoop further the cache above with the + // WriteLineReq. + assert(!(is_invalidate && + pkt->cmd != MemCmd::InvalidateResp && + !mshr->hasPostInvalidate())); handleSnoop(tgt_pkt, blk, true, true, mshr->hasPostInvalidate()); break;