mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: sha@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free
Date: Tue, 19 Jun 2012 14:42:32 +0200	[thread overview]
Message-ID: <4FE073B8.8090309@pengutronix.de> (raw)
In-Reply-To: <1340109391-22794-1-git-send-email-mkl@pengutronix.de>


[-- 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

      parent reply	other threads:[~2012-06-19 12:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Marc Kleine-Budde [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE073B8.8090309@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox