Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Anil kumar <anils_r@yahoo.com>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: dma_pool_alloc restrict < 4GB address
Date: Wed, 12 Nov 2008 20:03:34 -0700	[thread overview]
Message-ID: <20081113030334.GW15439@parisc-linux.org> (raw)
In-Reply-To: <231988.14599.qm@web32401.mail.mud.yahoo.com>

On Wed, Nov 12, 2008 at 02:14:24PM -0800, Anil kumar wrote:
> Is there anyway to restrict the returned bus address(dma address) from dma_poll_alloc to < 4GB ?
> The function returns a dma address(of type dma_addr_t). Is there anyway I can ensure to restrict it to < 4B address.
> I guess we can do that in pci_alloc_consistent as by default it returns 32bit address. 

dma_pool_alloc (as described in the documentation ...) allocates memory
using dma_alloc_coherent().  As long as you've set the coherent mask
to 32-bit (or left it alone, since it's 32-bit by default ...), you'll
get 32-bit dma addresses back.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

      reply	other threads:[~2008-11-13  3:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 22:14 dma_pool_alloc restrict < 4GB address Anil kumar
2008-11-13  3:03 ` Matthew Wilcox [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=20081113030334.GW15439@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=anils_r@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox