mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free
@ 2012-06-19 12:36 Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 1/6] ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions Marc Kleine-Budde
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

Hello,

on ARM using dfu mode we've seen problems with dma memory allocations.
Some drivers use dma_inv_range on allocated buffers, which corrupts memory
around the buffer, it it's not aligned to cache lines. This series
introduces: dma_alloc() and dma_free() that allocate memory aligned to
cache lines. This is 64 bytes on ARM (just to be sure) and
DCACHE_LINE_SIZE on nios2. All other arch do a transparent xmalloc.

Feel free to add the appropriate alignment for your architecture to
"include/asm/dma.h"

regards, Marc


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 1/6] ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
@ 2012-06-19 12:36 ` Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 2/6] ARM mmu: introduce dma_alloc, dma_free Marc Kleine-Budde
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/cpu/mmu.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index c19f931..55b07a4 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -299,11 +299,9 @@ void *dma_alloc_coherent(size_t size)
 	size = PAGE_ALIGN(size);
 	ret = xmemalign(4096, size);
 
-#ifdef CONFIG_MMU
 	dma_inv_range((unsigned long)ret, (unsigned long)ret + size);
 
 	remap_range(ret, size, PTE_FLAGS_UNCACHED);
-#endif
 
 	return ret;
 }
@@ -320,9 +318,7 @@ void *phys_to_virt(unsigned long phys)
 
 void dma_free_coherent(void *mem, size_t size)
 {
-#ifdef CONFIG_MMU
 	remap_range(mem, size, PTE_FLAGS_CACHED);
-#endif
 
 	free(mem);
 }
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/6] ARM mmu: introduce dma_alloc, dma_free
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 1/6] ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions Marc Kleine-Budde
@ 2012-06-19 12:36 ` Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 3/6] nios: add dma_alloc, dma_free and asm/dma.h Marc Kleine-Budde
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

dma_alloc() allocates memory aligned to cache lines. We have to use
cache line aligned buffers if a driver calls dma_inv_range on the
buffer. Add dma_free() for documentation reasons, too.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/arm/include/asm/dma.h |    8 ++++++++
 arch/arm/include/asm/mmu.h |   10 ++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/dma.h

diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
new file mode 100644
index 0000000..cb9cd1b
--- /dev/null
+++ b/arch/arm/include/asm/dma.h
@@ -0,0 +1,8 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#include <asm/mmu.h>
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index f5ae7a8..cc3529f 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -23,6 +23,16 @@ static inline void setup_dma_coherent(unsigned long offset)
 {
 }
 
+static inline void *dma_alloc(size_t size)
+{
+	return xmemalign(64, size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
 #ifdef CONFIG_MMU
 void *dma_alloc_coherent(size_t size);
 void dma_free_coherent(void *mem, size_t size);
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 3/6] nios: add dma_alloc, dma_free and asm/dma.h
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 1/6] ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 2/6] ARM mmu: introduce dma_alloc, dma_free Marc Kleine-Budde
@ 2012-06-19 12:36 ` Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 4/6] blackfin, mips, openrisc, ppc, sandbox, x86: add transparent dma_alloc, dma_free inlines Marc Kleine-Budde
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

Some drivers call dma_inv_range() on buffers, on arm these buffers must
be cache line aligned.  This patch add dma_alloc, dma_free to existing
dma-mapping.h. On nios the mem is aligned to DCACHE_LINE_SIZE.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/nios2/include/asm/dma-mapping.h |   10 ++++++++++
 arch/nios2/include/asm/dma.h         |    8 ++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
 create mode 100644 arch/nios2/include/asm/dma.h

diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h
index 5b70f4c..0ec9c89 100644
--- a/arch/nios2/include/asm/dma-mapping.h
+++ b/arch/nios2/include/asm/dma-mapping.h
@@ -22,4 +22,14 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
 	return (void *)(*handle | IO_REGION_BASE);
 }
 
+static inline void *dma_alloc(size_t size)
+{
+	return xmemalign(DCACHE_LINE_SIZE, size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
 #endif /* __ASM_NIOS2_DMA_MAPPING_H */
diff --git a/arch/nios2/include/asm/dma.h b/arch/nios2/include/asm/dma.h
new file mode 100644
index 0000000..8f709d2
--- /dev/null
+++ b/arch/nios2/include/asm/dma.h
@@ -0,0 +1,8 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#include <asm/dma-mapping.h>
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 4/6] blackfin, mips, openrisc, ppc, sandbox, x86: add transparent dma_alloc, dma_free inlines
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
                   ` (2 preceding siblings ...)
  2012-06-19 12:36 ` [PATCH 3/6] nios: add dma_alloc, dma_free and asm/dma.h Marc Kleine-Budde
@ 2012-06-19 12:36 ` Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 5/6] USB gadget fsl: request cacheline aligned buffer Marc Kleine-Budde
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

Some drivers call dma_inv_range() on buffers, on arm these buffers must
be cache line aligned. This patch introduces transparent dma_alloc,
dma_free for blackfin, mips, openrisc, ppc, sandbox, x86 architectures
which translate into xmemalign and free. The arm version uses xmemalign.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 arch/blackfin/include/asm/dma.h |   21 +++++++++++++++++++++
 arch/mips/include/asm/dma.h     |   21 +++++++++++++++++++++
 arch/openrisc/include/asm/dma.h |   21 +++++++++++++++++++++
 arch/ppc/include/asm/dma.h      |   21 +++++++++++++++++++++
 arch/sandbox/include/asm/dma.h  |   21 +++++++++++++++++++++
 arch/x86/include/asm/dma.h      |   21 +++++++++++++++++++++
 6 files changed, 126 insertions(+), 0 deletions(-)
 create mode 100644 arch/blackfin/include/asm/dma.h
 create mode 100644 arch/mips/include/asm/dma.h
 create mode 100644 arch/openrisc/include/asm/dma.h
 create mode 100644 arch/ppc/include/asm/dma.h
 create mode 100644 arch/sandbox/include/asm/dma.h
 create mode 100644 arch/x86/include/asm/dma.h

diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h
new file mode 100644
index 0000000..c46d320
--- /dev/null
+++ b/arch/blackfin/include/asm/dma.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#ifndef __ASM_DMA_H
+#define __ASM_DMA_H
+
+static inline void *dma_alloc(size_t size)
+{
+	return xmalloc(size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
+#endif /* __ASM_DMA_H */
diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h
new file mode 100644
index 0000000..c46d320
--- /dev/null
+++ b/arch/mips/include/asm/dma.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#ifndef __ASM_DMA_H
+#define __ASM_DMA_H
+
+static inline void *dma_alloc(size_t size)
+{
+	return xmalloc(size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
+#endif /* __ASM_DMA_H */
diff --git a/arch/openrisc/include/asm/dma.h b/arch/openrisc/include/asm/dma.h
new file mode 100644
index 0000000..c46d320
--- /dev/null
+++ b/arch/openrisc/include/asm/dma.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#ifndef __ASM_DMA_H
+#define __ASM_DMA_H
+
+static inline void *dma_alloc(size_t size)
+{
+	return xmalloc(size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
+#endif /* __ASM_DMA_H */
diff --git a/arch/ppc/include/asm/dma.h b/arch/ppc/include/asm/dma.h
new file mode 100644
index 0000000..c46d320
--- /dev/null
+++ b/arch/ppc/include/asm/dma.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#ifndef __ASM_DMA_H
+#define __ASM_DMA_H
+
+static inline void *dma_alloc(size_t size)
+{
+	return xmalloc(size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
+#endif /* __ASM_DMA_H */
diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h
new file mode 100644
index 0000000..c46d320
--- /dev/null
+++ b/arch/sandbox/include/asm/dma.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#ifndef __ASM_DMA_H
+#define __ASM_DMA_H
+
+static inline void *dma_alloc(size_t size)
+{
+	return xmalloc(size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
+#endif /* __ASM_DMA_H */
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h
new file mode 100644
index 0000000..c46d320
--- /dev/null
+++ b/arch/x86/include/asm/dma.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This file is released under the GPLv2
+ *
+ */
+
+#ifndef __ASM_DMA_H
+#define __ASM_DMA_H
+
+static inline void *dma_alloc(size_t size)
+{
+	return xmalloc(size);
+}
+
+static inline void dma_free(void *mem)
+{
+	free(mem);
+}
+
+#endif /* __ASM_DMA_H */
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 5/6] USB gadget fsl: request cacheline aligned buffer
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
                   ` (3 preceding siblings ...)
  2012-06-19 12:36 ` [PATCH 4/6] blackfin, mips, openrisc, ppc, sandbox, x86: add transparent dma_alloc, dma_free inlines Marc Kleine-Budde
@ 2012-06-19 12:36 ` Marc Kleine-Budde
  2012-06-19 12:36 ` [PATCH 6/6] USB gadget: Fix dma memory allocations Marc Kleine-Budde
  2012-06-19 12:42 ` [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

From: Sascha Hauer <s.hauer@pengutronix.de>

The fsl udc driver allocates a buffer for small requests. The
driver then calls dma_inv_range later on it. This buffer happens
to be not cacheline aligned which means that a dma_inv_range can
corrupt other memory around the buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[mkl: use dma_alloc]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/usb/gadget/fsl_udc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc.c b/drivers/usb/gadget/fsl_udc.c
index 5b64ec2..2765b41 100644
--- a/drivers/usb/gadget/fsl_udc.c
+++ b/drivers/usb/gadget/fsl_udc.c
@@ -8,7 +8,7 @@
 #include <io.h>
 #include <poller.h>
 #include <asm/byteorder.h>
-#include <asm/mmu.h>
+#include <asm/dma.h>
 
 /* ### define USB registers here
  */
@@ -2109,7 +2109,8 @@ static int struct_udc_setup(struct fsl_udc *udc,
 	udc->status_req = container_of(fsl_alloc_request(NULL),
 			struct fsl_req, req);
 	/* allocate a small amount of memory to get valid address */
-	udc->status_req->req.buf = xmalloc(8);
+	udc->status_req->req.buf = dma_alloc(8);
+	udc->status_req->req.length = 8;
 	udc->resume_state = USB_STATE_NOTATTACHED;
 	udc->usb_state = USB_STATE_POWERED;
 	udc->ep0_dir = 0;
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 6/6] USB gadget: Fix dma memory allocations
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
                   ` (4 preceding siblings ...)
  2012-06-19 12:36 ` [PATCH 5/6] USB gadget fsl: request cacheline aligned buffer Marc Kleine-Budde
@ 2012-06-19 12:36 ` Marc Kleine-Budde
  2012-06-19 12:42 ` [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:36 UTC (permalink / raw)
  To: sha; +Cc: barebox

From: Sascha Hauer <s.hauer@pengutronix.de>

This is another variant of:

    USB gadget fsl: request cacheline aligned buffer

    The fsl udc driver allocates a buffer for small requests. The
    driver then calls dma_inv_range later on it. This buffer happens
    to be not cacheline aligned which means that a dma_inv_range can
    corrupt other memory around the buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[mkl: use dma_alloc]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/usb/gadget/composite.c |    5 +++--
 drivers/usb/gadget/dfu.c       |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index fd70e62..29848f7 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -24,6 +24,7 @@
 #include <errno.h>
 #include <usb/composite.h>
 #include <asm/byteorder.h>
+#include <asm/dma.h>
 
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 
@@ -867,7 +868,7 @@ composite_unbind(struct usb_gadget *gadget)
 		composite->unbind(cdev);
 
 	if (cdev->req) {
-		kfree(cdev->req->buf);
+		dma_free(cdev->req->buf);
 		usb_ep_free_request(gadget->ep0, cdev->req);
 	}
 	kfree(cdev);
@@ -911,7 +912,7 @@ static int __init composite_bind(struct usb_gadget *gadget)
 	cdev->req = usb_ep_alloc_request(gadget->ep0);
 	if (!cdev->req)
 		goto fail;
-	cdev->req->buf = malloc(USB_BUFSIZ);
+	cdev->req->buf = dma_alloc(USB_BUFSIZ);
 	if (!cdev->req->buf)
 		goto fail;
 	cdev->req->complete = composite_setup_complete;
diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c
index f26c1e4..987b51c 100644
--- a/drivers/usb/gadget/dfu.c
+++ b/drivers/usb/gadget/dfu.c
@@ -56,6 +56,7 @@
 #include <libbb.h>
 #include <init.h>
 #include <fs.h>
+#include <asm/dma.h>
 
 #define USB_DT_DFU_SIZE			9
 #define USB_DT_DFU			0x21
@@ -183,7 +184,7 @@ dfu_unbind(struct usb_configuration *c, struct usb_function *f)
 	if (gadget_is_dualspeed(c->cdev->gadget))
 		free(f->hs_descriptors);
 
-	free(dfu->dnreq->buf);
+	dma_free(dfu->dnreq->buf);
 	usb_ep_free_request(c->cdev->gadget->ep0, dfu->dnreq);
 	free(dfu);
 }
@@ -602,7 +603,7 @@ static int dfu_bind_config(struct usb_configuration *c)
 	dfu->dnreq = usb_ep_alloc_request(c->cdev->gadget->ep0);
 	if (!dfu->dnreq)
 		printf("usb_ep_alloc_request failed\n");
-	dfu->dnreq->buf = xmalloc(CONFIG_USBD_DFU_XFER_SIZE);
+	dfu->dnreq->buf = dma_alloc(CONFIG_USBD_DFU_XFER_SIZE);
 	dfu->dnreq->complete = dn_complete;
 	dfu->dnreq->zero = 0;
 
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free
  2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
                   ` (5 preceding siblings ...)
  2012-06-19 12:36 ` [PATCH 6/6] USB gadget: Fix dma memory allocations Marc Kleine-Budde
@ 2012-06-19 12:42 ` Marc Kleine-Budde
  6 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2012-06-19 12:42 UTC (permalink / raw)
  To: sha; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 2886 bytes --]

On 06/19/2012 02:36 PM, Marc Kleine-Budde wrote:

> on ARM using dfu mode we've seen problems with dma memory allocations.
> Some drivers use dma_inv_range on allocated buffers, which corrupts memory
> around the buffer, it it's not aligned to cache lines. This series
> introduces: dma_alloc() and dma_free() that allocate memory aligned to
> cache lines. This is 64 bytes on ARM (just to be sure) and
> DCACHE_LINE_SIZE on nios2. All other arch do a transparent xmalloc.
> 
> Feel free to add the appropriate alignment for your architecture to
> "include/asm/dma.h"

You can pull this series:

The following changes since commit 4c8d356a104d592088c6ec93b052cec9f6ff19ea:

  Merge branch 'for-next/mx28-ocotp' into next (2012-06-14 20:31:50 +0200)

are available in the git repository at:

  git.pengutronix.de:/git/mkl/barebox.git for-next/dma_alloc

Marc Kleine-Budde (4):
      ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions
      ARM mmu: introduce dma_alloc, dma_free
      nios: add dma_alloc, dma_free and asm/dma.h
      blackfin, mips, openrisc, ppc, sandbox, x86: add transparent dma_alloc, dma_free inlines

Sascha Hauer (2):
      USB gadget fsl: request cacheline aligned buffer
      USB gadget: Fix dma memory allocations

 arch/arm/cpu/mmu.c                   |    4 ----
 arch/arm/include/asm/dma.h           |    8 ++++++++
 arch/arm/include/asm/mmu.h           |   10 ++++++++++
 arch/blackfin/include/asm/dma.h      |   21 +++++++++++++++++++++
 arch/mips/include/asm/dma.h          |   21 +++++++++++++++++++++
 arch/nios2/include/asm/dma-mapping.h |   10 ++++++++++
 arch/nios2/include/asm/dma.h         |    8 ++++++++
 arch/openrisc/include/asm/dma.h      |   21 +++++++++++++++++++++
 arch/ppc/include/asm/dma.h           |   21 +++++++++++++++++++++
 arch/sandbox/include/asm/dma.h       |   21 +++++++++++++++++++++
 arch/x86/include/asm/dma.h           |   21 +++++++++++++++++++++
 drivers/usb/gadget/composite.c       |    5 +++--
 drivers/usb/gadget/dfu.c             |    5 +++--
 drivers/usb/gadget/fsl_udc.c         |    5 +++--
 14 files changed, 171 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/include/asm/dma.h
 create mode 100644 arch/blackfin/include/asm/dma.h
 create mode 100644 arch/mips/include/asm/dma.h
 create mode 100644 arch/nios2/include/asm/dma.h
 create mode 100644 arch/openrisc/include/asm/dma.h
 create mode 100644 arch/ppc/include/asm/dma.h
 create mode 100644 arch/sandbox/include/asm/dma.h
 create mode 100644 arch/x86/include/asm/dma.h

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-06-19 12:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19 12:36 [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde
2012-06-19 12:36 ` [PATCH 1/6] ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions Marc Kleine-Budde
2012-06-19 12:36 ` [PATCH 2/6] ARM mmu: introduce dma_alloc, dma_free Marc Kleine-Budde
2012-06-19 12:36 ` [PATCH 3/6] nios: add dma_alloc, dma_free and asm/dma.h Marc Kleine-Budde
2012-06-19 12:36 ` [PATCH 4/6] blackfin, mips, openrisc, ppc, sandbox, x86: add transparent dma_alloc, dma_free inlines Marc Kleine-Budde
2012-06-19 12:36 ` [PATCH 5/6] USB gadget fsl: request cacheline aligned buffer Marc Kleine-Budde
2012-06-19 12:36 ` [PATCH 6/6] USB gadget: Fix dma memory allocations Marc Kleine-Budde
2012-06-19 12:42 ` [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox