Skip to content

Commit 4288c86

Browse files
committed
[crorc] Remove legacy pending DMA relation
1 parent cf5e845 commit 4288c86

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/Crorc/CrorcDmaChannel.cxx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -109,29 +109,12 @@ void CrorcDmaChannel::deviceStartDma()
109109

110110
startDataReceiving();
111111

112-
log("DMA start deferred until enough superpages available", LogInfoDevel);
113-
114112
while (!mReadyQueue.isEmpty()) {
115113
mReadyQueue.popFront();
116114
}
117115
while (!mTransferQueue.isEmpty()) {
118116
mTransferQueue.popFront();
119117
}
120-
mPendingDmaStart = true;
121-
}
122-
123-
void CrorcDmaChannel::startPendingDma()
124-
{
125-
if (!mPendingDmaStart) {
126-
return;
127-
}
128-
129-
if (mTransferQueue.isEmpty()) { // We should never end up in here
130-
log("Insufficient superpages to start pending DMA", LogErrorDevel);
131-
return;
132-
}
133-
134-
log("Starting pending DMA", LogInfoDevel);
135118

136119
if (mGeneratorEnabled) {
137120
log("Starting data generator", LogInfoDevel);
@@ -151,7 +134,6 @@ void CrorcDmaChannel::startPendingDma()
151134

152135
std::this_thread::sleep_for(100ms);
153136

154-
mPendingDmaStart = false;
155137
log("DMA started", LogInfoOps);
156138
}
157139

@@ -275,15 +257,6 @@ bool CrorcDmaChannel::isASuperpageAvailable()
275257

276258
void CrorcDmaChannel::fillSuperpages()
277259
{
278-
if (mPendingDmaStart) {
279-
if (!mTransferQueue.isEmpty()) {
280-
startPendingDma();
281-
} else {
282-
// Waiting on enough superpages to start DMA...
283-
return;
284-
}
285-
}
286-
287260
// Check for arrivals & handle them
288261
if (!mIntermediateQueue.isEmpty() && isASuperpageAvailable()) {
289262

src/Crorc/CrorcDmaChannel.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ class CrorcDmaChannel final : public DmaChannelPdaBase
118118
/// Bus address of Superpage info in DMA buffer
119119
uintptr_t mSuperpageInfoAddressBus;
120120

121-
/// Starts pending DMA with given superpage for the initial pages
122-
void startPendingDma();
123-
124121
/// BAR used for DMA engine and configuration
125122
std::shared_ptr<CrorcBar> crorcBar;
126123

@@ -136,10 +133,6 @@ class CrorcDmaChannel final : public DmaChannelPdaBase
136133
/// Address of DMA buffer in userspace
137134
uintptr_t mDmaBufferUserspace = 0;
138135

139-
/// Indicates deviceStartDma() was called, but DMA was not actually started yet. We do this because we need a
140-
/// superpage to actually start.
141-
bool mPendingDmaStart = false;
142-
143136
// These variables are configuration parameters
144137

145138
/// DMA page size

0 commit comments

Comments
 (0)