dma_device.cc (12680:91f4d6668b4f) dma_device.cc (12749:223c83ed9979)
1/*
2 * Copyright (c) 2012, 2015, 2017 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 81 unchanged lines hidden (view full) ---

90 if (state->totBytes == state->numBytes) {
91 if (state->completionEvent) {
92 delay += state->delay;
93 device->schedule(state->completionEvent, curTick() + delay);
94 }
95 delete state;
96 }
97
1/*
2 * Copyright (c) 2012, 2015, 2017 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 81 unchanged lines hidden (view full) ---

90 if (state->totBytes == state->numBytes) {
91 if (state->completionEvent) {
92 delay += state->delay;
93 device->schedule(state->completionEvent, curTick() + delay);
94 }
95 delete state;
96 }
97
98 // delete the request that we created and also the packet
99 delete pkt->req;
98 // delete the packet
100 delete pkt;
101
102 // we might be drained at this point, if so signal the drain event
103 if (pendingCount == 0)
104 signalDrainDone();
105}
106
107bool

--- 52 unchanged lines hidden (view full) ---

160 // For simplicity, we return the last request, which would also be
161 // the only request in that case.
162 RequestPtr req = NULL;
163
164 DPRINTF(DMA, "Starting DMA for addr: %#x size: %d sched: %d\n", addr, size,
165 event ? event->scheduled() : -1);
166 for (ChunkGenerator gen(addr, size, sys->cacheLineSize());
167 !gen.done(); gen.next()) {
99 delete pkt;
100
101 // we might be drained at this point, if so signal the drain event
102 if (pendingCount == 0)
103 signalDrainDone();
104}
105
106bool

--- 52 unchanged lines hidden (view full) ---

159 // For simplicity, we return the last request, which would also be
160 // the only request in that case.
161 RequestPtr req = NULL;
162
163 DPRINTF(DMA, "Starting DMA for addr: %#x size: %d sched: %d\n", addr, size,
164 event ? event->scheduled() : -1);
165 for (ChunkGenerator gen(addr, size, sys->cacheLineSize());
166 !gen.done(); gen.next()) {
168 req = new Request(gen.addr(), gen.size(), flag, masterId);
167
168 req = std::make_shared<Request>(
169 gen.addr(), gen.size(), flag, masterId);
170
169 req->taskId(ContextSwitchTaskId::DMA);
170 PacketPtr pkt = new Packet(req, cmd);
171
172 // Increment the data pointer on a write
173 if (data)
174 pkt->dataStatic(data + gen.complete());
175
176 pkt->senderState = reqState;

--- 332 unchanged lines hidden ---
171 req->taskId(ContextSwitchTaskId::DMA);
172 PacketPtr pkt = new Packet(req, cmd);
173
174 // Increment the data pointer on a write
175 if (data)
176 pkt->dataStatic(data + gen.complete());
177
178 pkt->senderState = reqState;

--- 332 unchanged lines hidden ---