aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2012-11-08 05:02:07 -0500
committerVinod Koul <vinod.koul@intel.com>2013-01-08 01:05:11 -0500
commit2cbe7feba1ac521b5668609c35b94536bbbcd52f (patch)
tree70373963c3c6f3ee91ad073a5f987d36de4e8175 /drivers/dma
parente239345f642e6a255d0ba1e3d92c2f9ec5a44fbe (diff)
dmaengine: add cpu_relax() to busy-loop in dma_sync_wait()
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>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmaengine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index d37cf95987b6..242b8c0a3de8 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -267,7 +267,10 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
267 pr_err("%s: timeout!\n", __func__); 267 pr_err("%s: timeout!\n", __func__);
268 return DMA_ERROR; 268 return DMA_ERROR;
269 } 269 }
270 } while (status == DMA_IN_PROGRESS); 270 if (status != DMA_IN_PROGRESS)
271 break;
272 cpu_relax();
273 } while (1);
271 274
272 return status; 275 return status;
273} 276}