diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-07-07 09:51:04 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-07-07 09:51:04 +0100 |
commit | e9c3d59aae58f8fcf77ce5cf4b985dc9e2a90de2 (patch) | |
tree | 799c50d9a0b99f1623a16d9c1d49f4cb0d1fcbaf /src/dev/ide_disk.cc | |
parent | 1dc5e63b889647a153f01351f560a3beaa41f293 (diff) | |
download | gem5-e9c3d59aae58f8fcf77ce5cf4b985dc9e2a90de2.tar.xz |
sim: Make the drain state a global typed enum
The drain state enum is currently a part of the Drainable
interface. The same state machine will be used by the DrainManager to
identify the global state of the simulator. Make the drain state a
global typed enum to better cater for this usage scenario.
Diffstat (limited to 'src/dev/ide_disk.cc')
-rw-r--r-- | src/dev/ide_disk.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dev/ide_disk.cc b/src/dev/ide_disk.cc index bbdee8e51..2e6df3805 100644 --- a/src/dev/ide_disk.cc +++ b/src/dev/ide_disk.cc @@ -342,7 +342,7 @@ IdeDisk::doDmaTransfer() panic("Inconsistent DMA transfer state: dmaState = %d devState = %d\n", dmaState, devState); - if (ctrl->dmaPending() || ctrl->getDrainState() != Drainable::Running) { + if (ctrl->dmaPending() || ctrl->getDrainState() != DrainState::Running) { schedule(dmaTransferEvent, curTick() + DMA_BACKOFF_PERIOD); return; } else @@ -436,7 +436,7 @@ IdeDisk::doDmaRead() curPrd.getByteCount(), TheISA::PageBytes); } - if (ctrl->dmaPending() || ctrl->getDrainState() != Drainable::Running) { + if (ctrl->dmaPending() || ctrl->getDrainState() != DrainState::Running) { schedule(dmaReadWaitEvent, curTick() + DMA_BACKOFF_PERIOD); return; } else if (!dmaReadCG->done()) { @@ -518,7 +518,7 @@ IdeDisk::doDmaWrite() dmaWriteCG = new ChunkGenerator(curPrd.getBaseAddr(), curPrd.getByteCount(), TheISA::PageBytes); } - if (ctrl->dmaPending() || ctrl->getDrainState() != Drainable::Running) { + if (ctrl->dmaPending() || ctrl->getDrainState() != DrainState::Running) { schedule(dmaWriteWaitEvent, curTick() + DMA_BACKOFF_PERIOD); DPRINTF(IdeDisk, "doDmaWrite: rescheduling\n"); return; |