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 <andreas.hansson@arm.com>
This commit is contained in:
Nikos Nikoleris 2016-12-05 16:48:27 -05:00
parent 5ebb8ec46b
commit 77dfeb8c09

View file

@ -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;