All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur.tabi@ammasso.com>
To: Gerd Knorr <kraxel@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Will __pa(vmalloc()) ever work?
Date: Tue, 31 May 2005 10:51:27 -0500	[thread overview]
Message-ID: <429C87FF.5070003@ammasso.com> (raw)
In-Reply-To: <873bs5yrxj.fsf@bytesex.org>

Gerd Knorr wrote:

> You should use vmalloc_to_page() (this does the page-table walking
> with correct locking), then the usual dma mapping interface
> (pci_map_page() or pci_map_sg()) to get bus address(es) you can pass
> to your device for DMA.

My problem is that I don't know where the memory came from.  It could have been allocated 
via kmalloc, or vmalloc, or anywhere else.  Can I call vmalloc_to_page() on memory 
allocated via kmalloc()?  If the answer is no, then how can I tell whether the memory was 
allocated via vmalloc() or some other method?  I need a reliable virtual-to-physical (or 
virtual-to-bus, which is the same thing on x86 architectures) method for any memory address.

-- 
Timur Tabi
Staff Software Engineer
timur.tabi@ammasso.com

One thing a Southern boy will never say is,
"I don't think duct tape will fix it."
      -- Ed Smylie, NASA engineer for Apollo 13

  reply	other threads:[~2005-05-31 15:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27 19:26 Will __pa(vmalloc()) ever work? Timur Tabi
2005-05-27 19:29 ` Christoph Hellwig
2005-05-27 19:54   ` Timur Tabi
2005-05-27 20:31     ` Arnd Bergmann
2005-05-28 16:16   ` Russell King
2005-05-30  9:38 ` Gerd Knorr
2005-05-31 15:51   ` Timur Tabi [this message]
2005-05-31 16:13     ` Gerd Knorr
2005-05-31 18:59       ` Timur Tabi
2005-05-31 20:01         ` Russell King
2005-05-31 20:44         ` Brian Gerst

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=429C87FF.5070003@ammasso.com \
    --to=timur.tabi@ammasso.com \
    --cc=kraxel@suse.de \
    --cc=linux-kernel@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 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.