dev: Remove the return type from DmaPort::dmaAction.
This function had a comment claiming that returning an arbitrary request from the call was necessary for page table walker statistics, but looking at the actual code, the return type was never used. Also returning whatever the last request happens to be seems arbitrary, and a bad boundary for modularization. The page table walker should not depend on the internal implementation of the DMA port. Change-Id: I00281fbaf6aeb85b15baf54f3d4a23ca1ac72b8b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38716 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -141,7 +141,7 @@ DmaPort::recvReqRetry()
|
||||
trySendTimingReq();
|
||||
}
|
||||
|
||||
RequestPtr
|
||||
void
|
||||
DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
|
||||
uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay,
|
||||
Request::Flags flag)
|
||||
@@ -151,10 +151,6 @@ DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
|
||||
// i.e. cache line size
|
||||
DmaReqState *reqState = new DmaReqState(event, size, delay);
|
||||
|
||||
// (functionality added for Table Walker statistics)
|
||||
// We're only interested in this when there will only be one request.
|
||||
// For simplicity, we return the last request, which would also be
|
||||
// the only request in that case.
|
||||
RequestPtr req = nullptr;
|
||||
|
||||
DPRINTF(DMA, "Starting DMA for addr: %#x size: %d sched: %d\n", addr, size,
|
||||
@@ -186,16 +182,14 @@ DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
|
||||
// just created, for atomic this involves actually completing all
|
||||
// the requests
|
||||
sendDma();
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
RequestPtr
|
||||
void
|
||||
DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
|
||||
uint8_t *data, Tick delay, Request::Flags flag)
|
||||
{
|
||||
return dmaAction(cmd, addr, size, event, data,
|
||||
defaultSid, defaultSSid, delay, flag);
|
||||
dmaAction(cmd, addr, size, event, data,
|
||||
defaultSid, defaultSSid, delay, flag);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -150,11 +150,11 @@ class DmaPort : public RequestPort, public Drainable
|
||||
|
||||
DmaPort(ClockedObject *dev, System *s, uint32_t sid=0, uint32_t ssid=0);
|
||||
|
||||
RequestPtr
|
||||
void
|
||||
dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
|
||||
uint8_t *data, Tick delay, Request::Flags flag=0);
|
||||
|
||||
RequestPtr
|
||||
void
|
||||
dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
|
||||
uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay,
|
||||
Request::Flags flag=0);
|
||||
|
||||
Reference in New Issue
Block a user