Scatter Gather question : 2.6.test4 . page to vaddr
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
Quoted 8 lines · --- jd
Hi,
I see that 2.6
scatterlist.hhas eliminated the "address" element and uses page struct only, and thatpci_map_sg()is used to populate thedma_addressfield. I'm not really planning on using DMA .
Quoted 5 lines
How can I convert the page * entry
pointed to bySCpnt->request_bufferback 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
Quoted 8 lines · jd
I see that 2.6
scatterlist.hhas eliminated the "address" element and uses page struct only, and thatpci_map_sg()is used to populate thedma_addressfield. I'm not really planning on using DMA .How can I convert the page * entry
pointed to bySCpnt->request_bufferback 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().
Signature · 3 lines
"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
Quoted 9 lines · jd
I see that 2.6
scatterlist.hhas eliminated the "address" element and uses page struct only, and thatpci_map_sg()is used to populate thedma_addressfield. I'm not really planning on using DMA .How can I convert the page * entry
pointed to bySCpnt->request_bufferback 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