linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: jd <jpd_hp_linux_scsi@yahoo.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Scatter Gather question : 2.6.test4 . page to vaddr
Date: Mon, 22 Sep 2003 21:41:09 +0100	[thread overview]
Message-ID: <20030922204109.GY13172@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030922201540.68358.qmail@web60210.mail.yahoo.com>

On Mon, Sep 22, 2003 at 01:15:40PM -0700, jd wrote:
> I see that 2.6 scatterlist.h has eliminated the "address" element
> and uses page struct only, and that  pci_map_sg() is used to 
> populate the dma_address field. I'm not really planning on
> using DMA .
> 
> How can I convert the page * entry 
> pointed to by  SCpnt->request_buffer   back to a vaddr ? 
> I don't see a page-to-vaddr() . function ?

The trick is that there may not be a vaddr for that struct page.  If it's
in highmem on x86, then it only ever gets temporary mappings into the
kernel's space.  You're probably looking for kmap(), kmap_atomic() or,
if you really really know it's a lowmem page, page_address().

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

      parent reply	other threads:[~2003-09-22 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-22 20:15 Scatter Gather question : 2.6.test4 . page to vaddr jd
2003-09-22 20:32 ` jd
2003-09-22 20:34 ` James Bottomley
2003-09-22 20:41 ` 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=20030922204109.GY13172@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=jpd_hp_linux_scsi@yahoo.com \
    --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;
as well as URLs for NNTP newsgroup(s).