summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorTuan Ta <qtt2@cornell.edu>2018-01-22 12:54:14 -0500
committerTuan Ta <qtt2@cornell.edu>2018-06-14 22:41:11 +0000
commit7bab1d0aff897bc23b5677a51ae67b8cc32953dc (patch)
treeb306210feabe295f3aeaad2c1ac4d7c4679b117c /src/mem/packet.hh
parent74a8947fcb37ec4b3d43cf96740c474f0e3ffed8 (diff)
downloadgem5-7bab1d0aff897bc23b5677a51ae67b8cc32953dc.tar.xz
base,mem: Support AtomicOpFunctor in the classic memory system
AtomicOpFunctor can be used to implement atomic memory operations. AtomicOpFunctor is captured inside a memory request and executed directly in the memory hierarchy in a single step. This patch enables AtomicOpFunctor pointers to be included in a memory request and executed in a single step in the classic cache system. This patch also makes the copy constructor of Request class do a deep copy of AtomicOpFunctor object. This prevents a copy of a Request object from accessing a deleted AtomicOpFunctor object. Change-Id: I6649532b37f711e55f4552ad26893efeb300dd37 Reviewed-on: https://gem5-review.googlesource.com/8185 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 5bc466bf1..5c041120a 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -841,7 +841,7 @@ class Packet : public Printable
{
if (req->isLLSC())
return MemCmd::StoreCondReq;
- else if (req->isSwap())
+ else if (req->isSwap() || req->isAtomic())
return MemCmd::SwapReq;
else if (req->isCacheInvalidate()) {
return req->isCacheClean() ? MemCmd::CleanInvalidReq :