Nikos Nikoleris has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/16182

Change subject: mem-cache: Copy over flags to forwarded response
......................................................................

mem-cache: Copy over flags to forwarded response

A cache that forwards a request to the memory below does not fill and
forwards the response with the data to cache above. This change
ensures that the flags of the original response are also preserved.

Change-Id: I244b20b073c31b976358816c5b14bba413b8271f
Signed-off-by: Nikos Nikoleris <[email protected]>
---
M src/mem/cache/cache.cc
1 file changed, 13 insertions(+), 1 deletion(-)



diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index e23c4ef..b3dffea 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2018 ARM Limited
+ * Copyright (c) 2010-2019 ARM Limited
  * All rights reserved.
  *
  * The license below extends only to copyright in the software and shall
@@ -786,6 +786,18 @@

                     tgt_pkt->setData(pkt->getConstPtr<uint8_t>());
                 }
+
+                // this response did not allocate here and therefore
+                // it was not consumed, make sure that any flags are
+                // carried over to cache above
+
+                if (pkt->cacheResponding()) {
+                    tgt_pkt->setCacheResponding();
+                }
+
+                if (pkt->hasSharers()) {
+                    tgt_pkt->setHasSharers();
+                }
             }
             tgt_pkt->makeTimingResponse();
             // if this packet is an error copy that to the new packet

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16182
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I244b20b073c31b976358816c5b14bba413b8271f
Gerrit-Change-Number: 16182
Gerrit-PatchSet: 1
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to