Re: [PATCH] nommu: reimplement remap_pfn_range() to simply return 0
From: Bob Liu <hidden>
Date: 2011-06-20 07:51:16
On Mon, Jun 20, 2011 at 2:59 PM, Daniel Glöckner [off-list ref] wrote:
On Mon, Jun 20, 2011 at 01:22:13PM +0800, Bob Liu wrote:quoted
Function remap_pfn_range() means map physical address pfn<<PAGE_SHIFT to user addr. For nommu arch it's implemented by vma->vm_start = pfn << PAGE_SHIFT which is wrong acroding the original meaning of this function. Some driver developer using remap_pfn_range() with correct parameter will get unexpected result because vm_start is changed. It should be implementd just like addr = pfn << PAGE_SHIFT which is meanless on nommu arch, so this patch just make it simply return 0.I'd return -EINVAL if addr != pfn << PAGE_SHIFT.
okay.
And I can imagine architectures wanting to do something with the prot flags.
Actually it's just a fake function on nommu arch, so in my opinion we'd better keep it simple as current. -- Regards, --Bob -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>