diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-06-03 13:10:26 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2018-06-11 16:55:30 +0000 |
commit | 2113b21996d086dab32b9fd388efe3df241bfbd2 (patch) | |
tree | 26d944027f726dde3ec49b67538663ccc41bcad3 /src/mem/cache | |
parent | 59505f7305cc3f3b7637233fd2d231bd7f561e80 (diff) | |
download | gem5-2113b21996d086dab32b9fd388efe3df241bfbd2.tar.xz |
misc: Substitute pointer to Request with aliased RequestPtr
Every usage of Request* in the code has been replaced with the
RequestPtr alias. This is a preparing patch for when RequestPtr will be
the typdefed to a smart pointer to Request rather then a raw pointer to
Request.
Change-Id: I73cbaf2d96ea9313a590cdc731a25662950cd51a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10995
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/mem/cache')
-rw-r--r-- | src/mem/cache/base.cc | 4 | ||||
-rw-r--r-- | src/mem/cache/cache.cc | 3 | ||||
-rw-r--r-- | src/mem/cache/prefetch/queued.cc | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index a8f29e370..f753cc315 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -1278,7 +1278,7 @@ BaseCache::writebackBlk(CacheBlk *blk) writebacks[Request::wbMasterId]++; - Request *req = new Request(regenerateBlkAddr(blk), blkSize, 0, + RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0, Request::wbMasterId); if (blk->isSecure()) req->setFlags(Request::SECURE); @@ -1313,7 +1313,7 @@ BaseCache::writebackBlk(CacheBlk *blk) PacketPtr BaseCache::writecleanBlk(CacheBlk *blk, Request::Flags dest, PacketId id) { - Request *req = new Request(regenerateBlkAddr(blk), blkSize, 0, + RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0, Request::wbMasterId); if (blk->isSecure()) { req->setFlags(Request::SECURE); diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index 34f3dc5b9..86c1640e5 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -872,7 +872,8 @@ Cache::cleanEvictBlk(CacheBlk *blk) assert(!writebackClean); assert(blk && blk->isValid() && !blk->isDirty()); // Creating a zero sized write, a message to the snoop filter - Request *req = + + RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0, Request::wbMasterId); if (blk->isSecure()) diff --git a/src/mem/cache/prefetch/queued.cc b/src/mem/cache/prefetch/queued.cc index bf3a384ea..00d62f17f 100644 --- a/src/mem/cache/prefetch/queued.cc +++ b/src/mem/cache/prefetch/queued.cc @@ -223,7 +223,7 @@ QueuedPrefetcher::insert(AddrPriority &pf_info, bool is_secure) } /* Create a prefetch memory request */ - Request *pf_req = + RequestPtr pf_req = new Request(pf_info.first, blkSize, 0, masterId); if (is_secure) { |