From: Jeff Brower <jbrower@signalogic•com>
To: Scott Wood <scottwood@freescale•com>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: driver replacements for kmalloc and __pa()
Date: Wed, 10 Sep 2008 19:44:59 -0500 [thread overview]
Message-ID: <48C86A0B.5EDE904C@signalogic.com> (raw)
In-Reply-To: 48C6F7AA.2000608@freescale.com
Scott-
> > What are the up-to-date APIs we should be using for DMA memory allocation and
> > virtual-to-physical address translation? We have another driver for another device
> > that's working fine on this board and it uses pci_alloc_consistent(). What about
> > bus_space_vaddr()? I'm hoping to get a recommendation for what's currently
> > appropriate and most future-proof for drivers that depend on external PCI DMA.
>
> Documentation/DMA-API.txt.
Thanks very much Scott. It appears that dma_alloc_coherent() is the recommended
path. Is there a good reason to use this instead of pci_alloc_consistent()? I can
find comments about using the GFP_KERNEL flag with dma_alloc_coherent(), which is
supposed to help when the system is low on memory. But we wouldn't expect that to
occur in a situation where the driver is loaded/initialized at boot-time.
-Jeff
prev parent reply other threads:[~2008-09-11 0:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 22:00 driver replacements for kmalloc and __pa() Jeff Brower
2008-09-09 22:24 ` Scott Wood
2008-09-11 0:44 ` Jeff Brower [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=48C86A0B.5EDE904C@signalogic.com \
--to=jbrower@signalogic$(echo .)com \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
--cc=scottwood@freescale$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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