[PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free
Marc Kleine-Budde
mkl at pengutronix.de
Tue Jun 19 08:42:32 EDT 2012
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 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20120619/97cb0ea3/attachment-0001.sig>
More information about the barebox
mailing list