cpu: Fix bug introduced by RequestPtr type change
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 21 Jun 2018 08:53:37 +0000 (09:53 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 21 Jun 2018 12:09:19 +0000 (12:09 +0000)
Missing buffer allocation in mwaitAtomic.

Change-Id: Ifccb6df2427df8b0daac5ee6a99e5cca0b20825e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/11469
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/cpu/base.cc

index 1a497db9ae625f8bc69c0cd520f95fe307c1df2d..878e655512842107d1a6cb2cbe3dcc29f716edd7 100644 (file)
@@ -318,7 +318,8 @@ BaseCPU::mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseTLB *dtb)
     assert(tid < numThreads);
     AddressMonitor &monitor = addressMonitor[tid];
 
-    RequestPtr req;
+    RequestPtr req = std::make_shared<Request>();
+
     Addr addr = monitor.vAddr;
     int block_size = cacheLineSize();
     uint64_t mask = ~((uint64_t)(block_size - 1));