summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/mshr.cc')
-rw-r--r--src/mem/cache/mshr.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 86b5a4c08..dd827ae12 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -74,9 +74,8 @@ MSHR::TargetList::TargetList()
{}
-inline void
-MSHR::TargetList::add(PacketPtr pkt, Tick readyTime,
- Counter order, Target::Source source, bool markPending)
+void
+MSHR::TargetList::updateFlags(PacketPtr pkt, Target::Source source)
{
if (source != Target::FromSnoop) {
if (pkt->needsWritable()) {
@@ -90,7 +89,22 @@ MSHR::TargetList::add(PacketPtr pkt, Tick readyTime,
hasUpgrade = true;
}
}
+}
+
+void
+MSHR::TargetList::populateFlags()
+{
+ resetFlags();
+ for (auto& t: *this) {
+ updateFlags(t.pkt, t.source);
+ }
+}
+inline void
+MSHR::TargetList::add(PacketPtr pkt, Tick readyTime,
+ Counter order, Target::Source source, bool markPending)
+{
+ updateFlags(pkt, source);
if (markPending) {
// Iterate over the SenderState stack and see if we find
// an MSHR entry. If we do, set the downstreamPending