Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c1ef591 authored by Tomoya MORINAGA's avatar Tomoya MORINAGA Committed by Vinod Koul
Browse files

pch_dma: Use GFP_ATOMIC because called from interrupt context



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: default avatarTomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 30fb980b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;