From: Jes Sorensen <jes@trained-monkey.org>
To: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: virt_to_page/pci_map_page vs. pci_map_single
Date: 03 Nov 2003 03:10:46 -0500 [thread overview]
Message-ID: <yq0wuahan3t.fsf@trained-monkey.org> (raw)
In-Reply-To: <20031102181224.GD2149@ma.emulex.com>
>>>>> "Jamie" == Jamie Wellnitz <Jamie.Wellnitz@emulex.com> writes:
Jamie> page = virt_to_page(buffer); offset = ((unsigned long)buffer &
Jamie> ~PAGE_MASK); busaddr = pci_map_page(pci_dev, page, offset, len,
Jamie> direction);
Jamie> How is this preferable to:
Jamie> pci_map_single( pci_dev, buffer, len, direction);
Jamie> pci_map_single can't handle highmem pages (because they don't
Jamie> have a kernel virtual address) but doesn't virt_to_page suffer
Jamie> from the same limitation? Is there some benefit on
Jamie> architectures that don't have highmem?
virt_to_page() can handle any page in the standard kernel region
including pages that are physically in 64-bit space if the
architecture requires it. It doesn't handle vmalloc pages etc. but
one shouldn't try and dynamically map vmalloc pages at
random. pci_map_page() can handle all memory in the system though as
every page that can be mapped has a struct page * entry.
pci_map_page() is the correct API to use, pci_map_single() is
deprecated.
Cheers,
Jes
next prev parent reply other threads:[~2003-11-03 8:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-02 18:12 virt_to_page/pci_map_page vs. pci_map_single Jamie Wellnitz
2003-11-03 8:10 ` Jes Sorensen [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2003-11-03 18:48 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
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
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=yq0wuahan3t.fsf@trained-monkey.org \
--to=jes@trained-monkey.org \
--cc=Jamie.Wellnitz@emulex.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.