All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: Replacing dma_alloc_writecombine for aarch64
Date: Mon, 3 Dec 2012 17:25:25 +0000	[thread overview]
Message-ID: <20121203172525.GD4261@arm.com> (raw)
In-Reply-To: <CAD0U-h+a6_1gtTS9pq-p7_BPmNnghUMMFZAHr8JdiK1kXrEHZQ@mail.gmail.com>

On Mon, Dec 03, 2012 at 05:18:35PM +0000, Ryan Harkin wrote:
> Some time ago, I converted the PL111 driver to use device tree [1].  I
> gathered some feedback after an RFC and I was recently updating my
> driver.  However, with my aarch64 work, I found that the driver
> doesn't compile for aarch64 because I've been using
> dma_alloc_writecombine in the driver.  As aarch64 doesn't use the
> driver with DMA, I hacked it to get my aarch64 branch working.
> 
> Is there another API you can recommend I use for DMA that will work
> with both flavours?

You can use dma_alloc_coherent() which gives the same thing on ARMv7
(and some ARMv6) and AArch64 (write-combine memory). However, there is
ARMv5 where this translates to strongly ordered memory, so you can't the
coherent variant all the time.

-- 
Catalin

  reply	other threads:[~2012-12-03 17:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 17:18 Replacing dma_alloc_writecombine for aarch64 Ryan Harkin
2012-12-03 17:25 ` Catalin Marinas [this message]
2012-12-04 14:53   ` Ryan Harkin

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=20121203172525.GD4261@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.