149,150c149,150
< Cache::satisfyCpuSideRequest(PacketPtr pkt, CacheBlk *blk,
< bool deferred_response, bool pending_downgrade)
---
> Cache::satisfyRequest(PacketPtr pkt, CacheBlk *blk,
> bool deferred_response, bool pending_downgrade)
233,247c233,240
< if (clusivity == Enums::mostly_excl) {
< // if this cache is mostly exclusive with
< // respect to the cache above, drop the
< // block, no need to first unset the dirty
< // bit
< invalidateBlock(blk);
< } else {
< // if this cache is mostly inclusive, we
< // keep the block in the Exclusive state,
< // and pass it upwards as Modified
< // (writable and dirty), hence we have
< // multiple caches, all on the same path
< // towards memory, all considering the
< // same block writable, but only one
< // considering it Modified
---
> // if this cache is mostly inclusive, we
> // keep the block in the Exclusive state,
> // and pass it upwards as Modified
> // (writable and dirty), hence we have
> // multiple caches, all on the same path
> // towards memory, all considering the
> // same block writable, but only one
> // considering it Modified
249,256c242,248
< // we get away with multiple caches (on
< // the same path to memory) considering
< // the block writeable as we always enter
< // the cache hierarchy through a cache,
< // and first snoop upwards in all other
< // branches
< blk->status &= ~BlkDirty;
< }
---
> // we get away with multiple caches (on
> // the same path to memory) considering
> // the block writeable as we always enter
> // the cache hierarchy through a cache,
> // and first snoop upwards in all other
> // branches
> blk->status &= ~BlkDirty;
436,438c428,429
< } else if ((blk != nullptr) &&
< (pkt->needsWritable() ? blk->isWritable() :
< blk->isReadable())) {
---
> } else if (blk && (pkt->needsWritable() ? blk->isWritable() :
> blk->isReadable())) {
441c432,434
< satisfyCpuSideRequest(pkt, blk);
---
> satisfyRequest(pkt, blk);
> maintainClusivity(pkt->fromCache(), blk);
>
459a453,464
> Cache::maintainClusivity(bool from_cache, CacheBlk *blk)
> {
> if (from_cache && blk && blk->isValid() && !blk->isDirty() &&
> clusivity == Enums::mostly_excl) {
> // if we have responded to a cache, and our block is still
> // valid, but not dirty, and this cache is mostly exclusive
> // with respect to the cache above, drop the block
> invalidateBlock(blk);
> }
> }
>
> void
1076c1081
< satisfyCpuSideRequest(pkt, blk);
---
> satisfyRequest(pkt, blk);
1083c1088,1089
< satisfyCpuSideRequest(pkt, blk);
---
> satisfyRequest(pkt, blk);
> maintainClusivity(pkt->fromCache(), blk);
1320a1327,1328
> bool from_cache = false;
>
1342a1351,1354
> // keep track of whether we have responded to another
> // cache
> from_cache = from_cache || tgt_pkt->fromCache();
>
1365,1366c1377
< satisfyCpuSideRequest(tgt_pkt, blk,
< true, mshr->hasPostDowngrade());
---
> satisfyRequest(tgt_pkt, blk, true, mshr->hasPostDowngrade());
1453a1465,1466
> maintainClusivity(from_cache, blk);
>
1728c1741
< // happens in the subsequent satisfyCpuSideRequest.
---
> // happens in the subsequent call to satisfyRequest
1767c1780
< // dirty as part of satisfyCpuSideRequest
---
> // dirty as part of satisfyRequest