aboutsummaryrefslogtreecommitdiff
path: root/dma-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'dma-helpers.c')
-rw-r--r--dma-helpers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dma-helpers.c b/dma-helpers.c
index 41ef24a63b..03c92e0cc6 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -13,7 +13,7 @@
#include "trace/trace-root.h"
#include "qemu/thread.h"
#include "qemu/main-loop.h"
-#include "sysemu/cpus.h"
+#include "sysemu/cpu-timers.h"
#include "qemu/range.h"
/* #define DEBUG_IOMMU */
@@ -151,7 +151,7 @@ static void dma_blk_cb(void *opaque, int ret)
* from several sectors. This code splits all SGs into several
* groups. SGs in every group do not overlap.
*/
- if (mem && use_icount && dbs->dir == DMA_DIRECTION_FROM_DEVICE) {
+ if (mem && icount_enabled() && dbs->dir == DMA_DIRECTION_FROM_DEVICE) {
int i;
for (i = 0 ; i < dbs->iov.niov ; ++i) {
if (ranges_overlap((intptr_t)dbs->iov.iov[i].iov_base,