diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-12-05 16:48:27 -0500 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-12-05 16:48:27 -0500 |
commit | 77dfeb8c09a63e38b215a0140a11377889cf4558 (patch) | |
tree | 7e73d97b1473665d76f365cc0d6cf86f9a544681 /src | |
parent | 5ebb8ec46b9831f4a519b856f45bd383d0c15724 (diff) | |
download | gem5-77dfeb8c09a63e38b215a0140a11377889cf4558.tar.xz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/cache/cache.cc | 13 |
1 files changed, 12 insertions, 1 deletions
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; |