Skip to content

Commit

Permalink
dmaengine: add cpu_relax() to busy-loop in dma_sync_wait()
Browse files Browse the repository at this point in the history
Removal of the busy-loop from dma_sync_wait() is not a trivial
task so just add cpu_relax() to the loop for now.

Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dan Williams <djbw@fb.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Vinod Koul committed Jan 8, 2013
1 parent e239345 commit 2cbe7fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/dma/dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
pr_err("%s: timeout!\n", __func__);
return DMA_ERROR;
}
} while (status == DMA_IN_PROGRESS);
if (status != DMA_IN_PROGRESS)
break;
cpu_relax();
} while (1);

return status;
}
Expand Down

0 comments on commit 2cbe7fe

Please sign in to comment.