All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Jes Sorensen <jes@wildopensource.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: virt_to_page/pci_map_page vs. pci_map_single
Date: Mon, 3 Nov 2003 17:03:35 -0500	[thread overview]
Message-ID: <20031103220335.GH18060@ma.emulex.com> (raw)
In-Reply-To: <1067885332.2076.13.camel@mulgrave>

On Mon, Nov 03, 2003 at 12:48:42PM -0600, James Bottomley wrote:
> 
> 
>     Jamie> The Document/DMA-mapping.txt in 2.6.0-test9 says "To map a
>     Jamie> single region, you do:" and then shows pci_map_single.  Is
>     Jamie> DMA-mapping.txt in need of patching?
>     
>     Sounds like it needs an update.
>     
> Erm, I don't think so.  pci_map_single() covers a different use case
> from pci_map_page().
> 
> The thing pci_map_single() can do that pci_map_page() can't is cope with
> contiguous regions greater than PAGE_SIZE in length (which you get
> either from kmalloc() or __get_free_pages()).  This feature is used in
> the SCSI layer for instance.

Does "pci_map_page(virt_to_page(addr))" handle contiguous regions of
multiple pages?  It seems like the i386 implementation will (assuming
we're dealing with kmalloc'd memory).  Although the semantics of
map_single seem better to me than map_page, if I'm mapping a single
"region" of multiple pages.

> 
> There has been talk of deprecating dma_map_single() in favour of
> dma_map_sg() (i.e. make all transfers use scatter/gather and eliminate
> dma_map_single() in favour of a single sg entry table) but nothing has
> been done about it (at least as far as I know).
> 
> James

Thanks,
Jamie Wellnitz

  reply	other threads:[~2003-11-03 22:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03 18:48 virt_to_page/pci_map_page vs. pci_map_single James Bottomley
2003-11-03 22:03 ` Jamie Wellnitz [this message]
2003-11-04  9:48 ` Jes Sorensen
2003-11-04 16:35   ` Matt Porter
2003-11-04 16:47     ` James Bottomley
2003-11-04 17:11       ` Matt Porter
2003-11-04 16:43   ` James Bottomley
2003-11-05 16:23     ` Anton Blanchard
2003-11-06  8:28     ` Jes Sorensen
     [not found] <NuZH.1a5.7@gated-at.bofh.it>
     [not found] ` <NI6s.1MM.3@gated-at.bofh.it>
     [not found]   ` <NMtC.7Vs.21@gated-at.bofh.it>
     [not found]     ` <NNSy.1Cd.1@gated-at.bofh.it>
     [not found]       ` <NV3O.5w7.19@gated-at.bofh.it>
     [not found]         ` <NWCA.7Qv.19@gated-at.bofh.it>
2003-11-04  8:41           ` Ihar 'Philips' Filipau
  -- strict thread matches above, loose matches on Subject: below --
2003-11-02 18:12 Jamie Wellnitz
2003-11-03  8:10 ` Jes Sorensen
2003-11-03 12:52   ` Jamie Wellnitz
2003-11-03 14:17     ` Jes Sorensen
2003-11-03 22:02       ` David Mosberger
2003-11-04  0:41         ` David S. Miller
2003-11-04  9:44         ` Jes Sorensen

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=20031103220335.GH18060@ma.emulex.com \
    --to=jamie.wellnitz@emulex.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=jes@wildopensource.com \
    --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.