mem: Ensure deferred snoops are cache-line aligned
authorAndreas Hansson <andreas.hansson@arm.com>
Sun, 19 Feb 2017 10:30:31 +0000 (05:30 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Sun, 19 Feb 2017 10:30:31 +0000 (05:30 -0500)
This patch fixes a bug where a deferred snoop ended up being to a
partial cache line, and not cache-line aligned, all due to how we copy
the packet.

src/mem/cache/mshr.cc

index 577e8eb7914f618fda286e9b85a3ece711599131..2dd23440a9c5cb48ceb57a392272dc746325ca59 100644 (file)
@@ -415,7 +415,7 @@ MSHR::handleSnoop(PacketPtr pkt, Counter _order)
         // the packet and the request as part of handling the deferred
         // snoop.
         PacketPtr cp_pkt = will_respond ? new Packet(pkt, true, true) :
-            new Packet(new Request(*pkt->req), pkt->cmd);
+            new Packet(new Request(*pkt->req), pkt->cmd, blkSize);
 
         if (will_respond) {
             // we are the ordering point, and will consequently