summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/cache/cache_impl.hh4
-rw-r--r--src/mem/packet.hh1
-rw-r--r--src/unittest/cprintftest.cc2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 57ebff322..ff35a0749 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -342,8 +342,8 @@ Cache<TagStore,Coherence>::handleFill(BlkType *blk, MSHR * mshr,
target->getPtr<uint8_t>(), target->getSize());
}
} else {
- if (pkt->req->isLocked()) {
- blk->trackLoadLocked(pkt->req);
+ if (target->req->isLocked()) {
+ blk->trackLoadLocked(target->req);
}
std::memcpy(target->getPtr<uint8_t>(),
blk->data + target->getOffset(blkSize),
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 60f6e9ae0..65d2207db 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -42,6 +42,7 @@
#include <list>
#include <bitset>
+#include "base/compiler.hh"
#include "base/misc.hh"
#include "mem/request.hh"
#include "sim/host.hh"
diff --git a/src/unittest/cprintftest.cc b/src/unittest/cprintftest.cc
index a454be05e..7fb10375c 100644
--- a/src/unittest/cprintftest.cc
+++ b/src/unittest/cprintftest.cc
@@ -40,7 +40,7 @@ using namespace std;
int
main()
{
- char foo[9];
+ char foo[] = "foo";
cprintf("%s\n", foo);
cprintf("%d\n", 'A');