Results 1 to 1 of 1
I am currently writing a Linux Device Driver for a PCI device. I am trying to do a DMA transfer from the device to a user space buffer. However because ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-04-2006 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 1
Need get_user_pages to fall on a 64KB boundary
I am currently writing a Linux Device Driver for a PCI device. I am trying to do a DMA transfer from the device to a user space buffer. However because of the PCI device's limitations, I need the physical address that is generated from page_to_phys to be on a 64KB boundary. Here is the essential code, hostaddr is the address of my user space buffer.
pages = kmalloc(nr_pages, GFP_KERNEL);
get_user_pages(current, current->mm, hostaddr, nr_pages, rw == READ, 0, pages, NULL);
page_to_phys(pages[0]); //this address
since the physical address that comes out of page_to_phys is on a 4KB (PAGE_SIZE) boundary, the chances of my routine successfully transfering the data to the user buffer is 1 in 16. Any suggestions on how to move the pages attached to my user space buffer?
Thanks for the time and consideration,
Ron


Reply With Quote
