LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-14-2006, 09:33 PM   #1
topjupiter
LQ Newbie
 
Registered: Apr 2006
Posts: 1

Rep: Reputation: 0
remap_pfn_range() can only map less than 2MB?


static int remap_mmap(struct file *filp, struct vm_area_struct *vma)
{
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN;
vma->vm_ops = &remap_vm_ops;
return 0;
}
I program a char device driver, and allocate 32M memery in the kernel space. Now I want to map the space to the user space, so I write the upper program. In the end, however, I can only mmap the first 2MB memery, and the space between 2M and 32M is invalid although the program say there is no error. Can anyone help me? Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can transfer only 2MB using sftp nIMBVS Debian 1 11-26-2005 03:26 PM
Wireless Monitor card on 2Mb/s sdandeker Linux - Wireless Networking 5 07-07-2005 04:30 AM
160Gb/2Mb or 120Mb/8Mb ron_henry Linux - Hardware 5 03-29-2005 09:35 PM
SYSERR(root): hash map "generics": missing map file /etc/mail/genericstable.db? singying304 Linux - Networking 4 02-28-2005 06:49 AM
386 + 2mb ram KptnKrill Linux - Distributions 3 10-12-2003 12:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration