Skip to content

Commit

Permalink
pch_dma: Use GFP_ATOMIC because called from interrupt context
Browse files Browse the repository at this point in the history
pdc_desc_get() is called from pd_prep_slave_sg, and the function is
called from interrupt context(e.g. Uart driver "pch_uart.c").
In fact, I saw kernel error message.
So, GFP_ATOMIC must be used not GFP_NOIO.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Tomoya MORINAGA authored and Vinod Koul committed Apr 15, 2013
1 parent 30fb980 commit 5c1ef59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/pch_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan)
dev_dbg(chan2dev(&pd_chan->chan), "scanned %d descriptors\n", i);

if (!ret) {
ret = pdc_alloc_desc(&pd_chan->chan, GFP_NOIO);
ret = pdc_alloc_desc(&pd_chan->chan, GFP_ATOMIC);
if (ret) {
spin_lock(&pd_chan->lock);
pd_chan->descs_allocated++;
Expand Down

0 comments on commit 5c1ef59

Please sign in to comment.