* Scatter Gather question : 2.6.test4 . page to vaddr
@ 2003-09-22 20:15 jd
2003-09-22 20:32 ` jd
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jd @ 2003-09-22 20:15 UTC (permalink / raw)
To: linux-scsi
Hi,
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 ?
Thanks for any insight.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Scatter Gather question : 2.6.test4 . page to vaddr
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
2 siblings, 0 replies; 4+ messages in thread
From: jd @ 2003-09-22 20:32 UTC (permalink / raw)
To: dead_emaill, linux-scsi
--- jd <jpd_hp_linux_scsi@yahoo.com> wrote:
>
> Hi,
>
> 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 ?
> Thanks for any insight.
>
Looks like
cur_ptr = (void *) pfn_to_kaddr( page_to_pfn(sg->page));
Did it ( At least once ;) ) !
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Scatter Gather question : 2.6.test4 . page to vaddr
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
2 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2003-09-22 20:34 UTC (permalink / raw)
To: dead_emaill; +Cc: linux-scsi
On Mon, 2003-09-22 at 15:15, 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 ?
> Thanks for any insight.
In general, you can't...the page may not be mapped in the kernel's
space. You can use kmap/kunmap to look at its contents.
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Scatter Gather question : 2.6.test4 . page to vaddr
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
2 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2003-09-22 20:41 UTC (permalink / raw)
To: jd; +Cc: linux-scsi
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-09-22 20:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox