summaryrefslogtreecommitdiff
path: root/src/mem/cache/cache.cc
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-05-02 14:41:22 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-05-30 13:08:55 +0000
commit8100fb5f19b09a93c1f3e3e8533322e1fa73e6d3 (patch)
tree5d0450c632ea767afc5939b0382fe479e2bf86a7 /src/mem/cache/cache.cc
parentf94f70237dfaac86c83dfbb7cb24e6a821b867eb (diff)
downloadgem5-8100fb5f19b09a93c1f3e3e8533322e1fa73e6d3.tar.xz
mem-cache: Determine if an MSHR has requests from another cache
To decide whether we allocate upon receiving a response we need to determine if any of the currently serviced requests (non-deferred targets) is comming from another cache. This change adds support for tracking this information in the MSHR. Change-Id: If1db93c12b6af5813b91b9d6b6e5e196d327f038 Reviewed-on: https://gem5-review.googlesource.com/10422 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/cache.cc')
-rw-r--r--src/mem/cache/cache.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index 73c7e1956..e9aec499a 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -1415,7 +1415,6 @@ Cache::recvTimingResp(PacketPtr pkt)
// First offset for critical word first calculations
int initial_offset = initial_tgt->pkt->getOffset(blkSize);
- bool from_cache = false;
MSHR::TargetList targets = mshr->extractServiceableTargets(pkt);
for (auto &target: targets) {
Packet *tgt_pkt = target.pkt;
@@ -1437,10 +1436,6 @@ Cache::recvTimingResp(PacketPtr pkt)
break; // skip response
}
- // keep track of whether we have responded to another
- // cache
- from_cache = from_cache || tgt_pkt->fromCache();
-
// unlike the other packet flows, where data is found in other
// caches or memory and brought back, write-line requests always
// have the data right away, so the above check for "is fill?"
@@ -1572,7 +1567,7 @@ Cache::recvTimingResp(PacketPtr pkt)
}
}
- maintainClusivity(from_cache, blk);
+ maintainClusivity(targets.hasFromCache, blk);
if (blk && blk->isValid()) {
// an invalidate response stemming from a write line request