pch_dma: Use GFP_ATOMIC because called from interrupt context
PATCH 1/1 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.
--- drivers/dma/pch_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/pch_dma.c +1 -1
@@ -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++;
Signature · 1 line
1.7.4.4
Hi
Could you review this patch ?
8 days have passed...
thanks,
tomoya
Quoted 25 lines · Tomoya MORINAGA
pdc_desc_get()is called frompd_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_ATOMICmust be used notGFP_NOIO.Signed-off-by Tomoya MORINAGA <[email protected]>--- drivers/dma/pch_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/pch_dma.c +1
-2@@ -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++; --1.7.4.4
Signature · 2 lines
ROHM Co., Ltd. tomoya
Quoted 4 lines · Tomoya MORINAGA
Hi
Could you review this patch ?
8 days have passed...
Sorry looks like I missed it. I have queued it up and will apply after -rc1
--
~Vinod
Quoted 34 lines
thanks,
tomoyaQuoted 25 lines · Tomoya MORINAGA
pdc_desc_get()is called frompd_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_ATOMICmust be used notGFP_NOIO.Signed-off-by Tomoya MORINAGA <[email protected]>--- drivers/dma/pch_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/pch_dma.c +1
-2@@ -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++; --1.7.4.4
Signature · 2 lines
ROHM Co., Ltd. tomoya
Vinod Koul
AppliedQuoted 7 lines · Tomoya MORINAGA
Quoted 6 lines
pdc_desc_get()is called frompd_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_ATOMICmust be used notGFP_NOIO.Signed-off-by Tomoya MORINAGA <[email protected]>
Applied, thanks
Quoted 23 lines
Quoted 19 lines
--- drivers/dma/pch_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/pch_dma.c +1
-2@@ -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++; --1.7.4.4
Signature · 2 lines
ROHM Co., Ltd. tomoya