linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi/pxa2xx: use GFP_ATOMIC in sg table allocation
@ 2013-06-18 14:29 Mika Westerberg
  2013-06-18 14:29 ` [PATCH 2/2] spi/pxa2xx: use a flag to check if the device is runtime suspended Mika Westerberg
  2013-06-18 18:11 ` [PATCH 1/2] spi/pxa2xx: use GFP_ATOMIC in sg table allocation Mark Brown
  0 siblings, 2 replies; 11+ messages in thread
From: Mika Westerberg @ 2013-06-18 14:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Eric Miao, Russell King, Haojian Zhuang, Mark Brown, Grant Likely,
	Mika Westerberg

pxa2xx_spi_map_dma_buffer() gets called in tasklet context so we can't
sleep when we allocate a new sg table. Use GFP_ATOMIC here instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/spi/spi-pxa2xx-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index f4cb744..3c0b551 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -59,7 +59,7 @@ static int pxa2xx_spi_map_dma_buffer(struct driver_data *drv_data,
 		int ret;
 
 		sg_free_table(sgt);
-		ret = sg_alloc_table(sgt, nents, GFP_KERNEL);
+		ret = sg_alloc_table(sgt, nents, GFP_ATOMIC);
 		if (ret)
 			return ret;
 	}
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-06-19 13:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 14:29 [PATCH 1/2] spi/pxa2xx: use GFP_ATOMIC in sg table allocation Mika Westerberg
2013-06-18 14:29 ` [PATCH 2/2] spi/pxa2xx: use a flag to check if the device is runtime suspended Mika Westerberg
2013-06-18 18:09   ` Mark Brown
2013-06-19  7:44     ` Mika Westerberg
2013-06-19  9:23       ` Mark Brown
2013-06-19  9:25     ` Russell King - ARM Linux
2013-06-19  9:39       ` Mark Brown
2013-06-19 10:05         ` Russell King - ARM Linux
2013-06-19 11:02           ` Mika Westerberg
2013-06-19 13:59           ` Mark Brown
2013-06-18 18:11 ` [PATCH 1/2] spi/pxa2xx: use GFP_ATOMIC in sg table allocation Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).