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>
This commit is contained in:
@@ -85,7 +85,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
|
||||
|
||||
template <class XC>
|
||||
inline void
|
||||
handleLockedRead(XC *xc, Request *req)
|
||||
handleLockedRead(XC *xc, RequestPtr req)
|
||||
{
|
||||
xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr() & ~0xf);
|
||||
xc->setMiscReg(MISCREG_LOCKFLAG, true);
|
||||
@@ -99,7 +99,7 @@ handleLockedSnoopHit(XC *xc)
|
||||
|
||||
template <class XC>
|
||||
inline bool
|
||||
handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
|
||||
handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
|
||||
{
|
||||
if (req->isUncacheable()) {
|
||||
// Funky Turbolaser mailbox access...don't update
|
||||
|
||||
@@ -91,7 +91,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
|
||||
|
||||
template <class XC>
|
||||
inline void
|
||||
handleLockedRead(XC *xc, Request *req)
|
||||
handleLockedRead(XC *xc, RequestPtr req)
|
||||
{
|
||||
xc->setMiscReg(MISCREG_LOCKADDR, req->getPaddr());
|
||||
xc->setMiscReg(MISCREG_LOCKFLAG, true);
|
||||
@@ -111,7 +111,7 @@ handleLockedSnoopHit(XC *xc)
|
||||
|
||||
template <class XC>
|
||||
inline bool
|
||||
handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
|
||||
handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
|
||||
{
|
||||
if (req->isSwap())
|
||||
return true;
|
||||
|
||||
@@ -63,7 +63,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
|
||||
|
||||
template <class XC>
|
||||
inline void
|
||||
handleLockedRead(XC *xc, Request *req)
|
||||
handleLockedRead(XC *xc, RequestPtr req)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ handleLockedSnoopHit(XC *xc)
|
||||
|
||||
template <class XC>
|
||||
inline bool
|
||||
handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
|
||||
handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -461,9 +461,10 @@ namespace HsailISA
|
||||
*d = gpuDynInst->wavefront()->ldsChunk->
|
||||
read<c0>(vaddr);
|
||||
} else {
|
||||
Request *req = new Request(0, vaddr, sizeof(c0), 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
RequestPtr req = new Request(0,
|
||||
vaddr, sizeof(c0), 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
|
||||
gpuDynInst->setRequestFlags(req);
|
||||
PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
|
||||
@@ -588,7 +589,7 @@ namespace HsailISA
|
||||
gpuDynInst->statusBitVector = VectorMask(1);
|
||||
gpuDynInst->useContinuation = false;
|
||||
// create request
|
||||
Request *req = new Request(0, 0, 0, 0,
|
||||
RequestPtr req = new Request(0, 0, 0, 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
req->setFlags(Request::ACQUIRE);
|
||||
@@ -1014,7 +1015,7 @@ namespace HsailISA
|
||||
gpuDynInst->execContinuation = &GPUStaticInst::execSt;
|
||||
gpuDynInst->useContinuation = true;
|
||||
// create request
|
||||
Request *req = new Request(0, 0, 0, 0,
|
||||
RequestPtr req = new Request(0, 0, 0, 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
req->setFlags(Request::RELEASE);
|
||||
@@ -1065,7 +1066,7 @@ namespace HsailISA
|
||||
gpuDynInst->wavefront()->ldsChunk->write<c0>(vaddr,
|
||||
*d);
|
||||
} else {
|
||||
Request *req =
|
||||
RequestPtr req =
|
||||
new Request(0, vaddr, sizeof(c0), 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
@@ -1488,7 +1489,7 @@ namespace HsailISA
|
||||
gpuDynInst->useContinuation = true;
|
||||
|
||||
// create request
|
||||
Request *req = new Request(0, 0, 0, 0,
|
||||
RequestPtr req = new Request(0, 0, 0, 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
req->setFlags(Request::RELEASE);
|
||||
@@ -1620,7 +1621,7 @@ namespace HsailISA
|
||||
"type.\n");
|
||||
}
|
||||
} else {
|
||||
Request *req =
|
||||
RequestPtr req =
|
||||
new Request(0, vaddr, sizeof(c0), 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId,
|
||||
@@ -1675,7 +1676,7 @@ namespace HsailISA
|
||||
// the acquire completes
|
||||
gpuDynInst->useContinuation = false;
|
||||
// create request
|
||||
Request *req = new Request(0, 0, 0, 0,
|
||||
RequestPtr req = new Request(0, 0, 0, 0,
|
||||
gpuDynInst->computeUnit()->masterId(),
|
||||
0, gpuDynInst->wfDynId);
|
||||
req->setFlags(Request::ACQUIRE);
|
||||
|
||||
@@ -75,7 +75,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
|
||||
|
||||
template <class XC>
|
||||
inline void
|
||||
handleLockedRead(XC *xc, Request *req)
|
||||
handleLockedRead(XC *xc, RequestPtr req)
|
||||
{
|
||||
xc->setMiscReg(MISCREG_LLADDR, req->getPaddr() & ~0xf);
|
||||
xc->setMiscReg(MISCREG_LLFLAG, true);
|
||||
@@ -92,7 +92,7 @@ handleLockedSnoopHit(XC *xc)
|
||||
|
||||
template <class XC>
|
||||
inline bool
|
||||
handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
|
||||
handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
|
||||
{
|
||||
if (req->isUncacheable()) {
|
||||
// Funky Turbolaser mailbox access...don't update
|
||||
|
||||
@@ -82,7 +82,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
|
||||
|
||||
|
||||
template <class XC> inline void
|
||||
handleLockedRead(XC *xc, Request *req)
|
||||
handleLockedRead(XC *xc, RequestPtr req)
|
||||
{
|
||||
locked_addrs.push(req->getPaddr() & ~0xF);
|
||||
DPRINTF(LLSC, "[cid:%d]: Reserved address %x.\n",
|
||||
@@ -94,7 +94,7 @@ handleLockedSnoopHit(XC *xc)
|
||||
{}
|
||||
|
||||
template <class XC> inline bool
|
||||
handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
|
||||
handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask)
|
||||
{
|
||||
// Normally RISC-V uses zero to indicate success and nonzero to indicate
|
||||
// failure (right now only 1 is reserved), but in gem5 zero indicates
|
||||
|
||||
Reference in New Issue
Block a user