changeset 119cfadf2203 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=119cfadf2203
description:
        mem: Fix snoop packet data allocation bug

        This patch fixes an issue where the snoop packet did not properly
        forward the data pointer in case of static data.

diffstat:

 src/mem/cache/cache_impl.hh |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r b3dfb40bb2ab -r 119cfadf2203 src/mem/cache/cache_impl.hh
--- a/src/mem/cache/cache_impl.hh       Tue Jun 09 09:21:16 2015 -0400
+++ b/src/mem/cache/cache_impl.hh       Tue Jun 09 09:21:17 2015 -0400
@@ -1610,7 +1610,11 @@
         // rewritten to be relative to cpu-side bus (if any)
         bool alreadyResponded = pkt->memInhibitAsserted();
         if (is_timing) {
-            Packet snoopPkt(pkt, true, false);  // clear flags, no allocation
+            // copy the packet so that we can clear any flags before
+            // forwarding it upwards, we also allocate data (passing
+            // the pointer along in case of static data), in case
+            // there is a snoop hit in upper levels
+            Packet snoopPkt(pkt, true, true);
             snoopPkt.setExpressSnoop();
             snoopPkt.pushSenderState(new ForwardResponseRecord());
             // the snoop packet does not need to wait any additional
@@ -1622,6 +1626,8 @@
                 assert(!alreadyResponded);
                 pkt->assertMemInhibit();
             } else {
+                // no cache (or anyone else for that matter) will
+                // respond, so delete the ForwardResponseRecord here
                 delete snoopPkt.popSenderState();
             }
             if (snoopPkt.sharedAsserted()) {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to