linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Jes Sorensen <jes@trained-monkey.org>
Cc: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: virt_to_page/pci_map_page vs. pci_map_single
Date: 04 Nov 2003 10:43:39 -0600	[thread overview]
Message-ID: <1067964220.1792.106.camel@mulgrave> (raw)
In-Reply-To: <yq0znfcjwh1.fsf@trained-monkey.org>

On Tue, 2003-11-04 at 03:48, Jes Sorensen wrote:
> The question is whether that should be allowed in the first place. Some
> IOMMU's will have to map it page-by-page anyway. However if it is to
> remain a valid use then I don't see why pci_map_page() shouldn't be
> able to handle it under the same conditions by passing it a
> size > PAGE_SIZE.

I really don't see what's to be gained by doing this.  map_page is for
mapping one page or a fragment of it.  It's designed for small zero copy
stuff, like networking.  To get it to map more than one page, really we
should pass in an array of struct pages.

If the data you have to map is > 1 Page, then the scatter gather
interface (dma_map_sg()) is a better way to handle it.  dma_map_single()
is for the special case of data generated in kernel, which is virtually
and physically contiguous (i.e. generated by kmalloc or get_free_pages,
so no highmem issues either), which we haven't passed through the SG
machinery.  It's special cased out in all the drivers that handle SG
transactions.

James



  parent reply	other threads:[~2003-11-04 16:44 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
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 [this message]
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=1067964220.1792.106.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=Jamie.Wellnitz@emulex.com \
    --cc=jes@trained-monkey.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).