changeset a7cb233caa7b in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=a7cb233caa7b
description:
        cpu: Fix memory access in Minor not setting parent Request flags

        This patch fixes cases where uncacheable/memory type flags are not set
        correctly on a memory op which is split in the LSQ.  Without this
        patch, request->request if freely used to check flags where the flags
        should actually come from the accumulation of request fragment flags.

        This patch also fixes a bug where an uncacheable access which passes
        through tryToSendRequest more than once can increment
        LSQ::numAccessesInMemorySystem more than once.

diffstat:

 src/cpu/minor/lsq.cc |  4 +++-
 src/cpu/minor/lsq.hh |  6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r bf52480abd01 -r a7cb233caa7b src/cpu/minor/lsq.cc
--- a/src/cpu/minor/lsq.cc      Fri Sep 12 10:22:47 2014 -0400
+++ b/src/cpu/minor/lsq.cc      Fri Sep 12 10:22:49 2014 -0400
@@ -476,6 +476,8 @@
             makePacketForRequest(*fragment, isLoad, this, request_data);
 
         fragmentPackets.push_back(fragment_packet);
+        /* Accumulate flags in parent request */
+        request.setFlags(fragment->getFlags());
     }
 
     /* Might as well make the overall/response packet here */
@@ -1029,7 +1031,7 @@
 
         /* Remember if this is an access which can't be idly
          *  discarded by an interrupt */
-        if (!bufferable) {
+        if (!bufferable && !request->issuedToMemory) {
             numAccessesIssuedToMemory++;
             request->issuedToMemory = true;
         }
diff -r bf52480abd01 -r a7cb233caa7b src/cpu/minor/lsq.hh
--- a/src/cpu/minor/lsq.hh      Fri Sep 12 10:22:47 2014 -0400
+++ b/src/cpu/minor/lsq.hh      Fri Sep 12 10:22:49 2014 -0400
@@ -585,7 +585,11 @@
 
   protected:
     /** Count of the number of mem. accesses which have left the
-     *  requests queue and are in the 'wild' in the memory system. */
+     *  requests queue and are in the 'wild' in the memory system and who
+     *  *must not* be interrupted as they are not normal cacheable
+     *  accesses.  This is a count of the number of in-flight requests
+     *  with issuedToMemory set who have visited tryToSendRequest at least
+     *  once */
     unsigned int numAccessesInMemorySystem;
 
     /** Number of requests in the DTLB in the requests queue */
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to