serial: pl011: Allocate TX DMA buffer from DMA capable memory
authorAndrew Jackson <Andrew.Jackson@arm.com>
Mon, 27 Oct 2014 14:16:23 +0000 (14:16 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Fri, 31 Oct 2014 12:22:15 +0000 (12:22 +0000)
Allocating with __GFP_DMA avoids the need for bounce buffers

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
drivers/tty/serial/amba-pl011.c

index dacf0a09ab248cff1b81aabdb451c8df7c43b8f8..2c9bfb263839df83f4166260a8634aa6bef0bd8f 100644 (file)
@@ -987,7 +987,7 @@ static void pl011_dma_startup(struct uart_amba_port *uap)
        if (!uap->dmatx.chan)
                return;
 
-       uap->dmatx.buf = kmalloc(PL011_DMA_BUFFER_SIZE, GFP_KERNEL);
+       uap->dmatx.buf = kmalloc(PL011_DMA_BUFFER_SIZE, GFP_KERNEL | __GFP_DMA);
        if (!uap->dmatx.buf) {
                dev_err(uap->port.dev, "no memory for DMA TX buffer\n");
                uap->port.fifosize = uap->fifosize;