Re: [PATCH] nommu: reimplement remap_pfn_range() to simply return 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 20, 2011 at 2:59 PM, Daniel Glöckner <daniel-gl@xxxxxxx> wrote:
> On Mon, Jun 20, 2011 at 01:22:13PM +0800, Bob Liu wrote:
>> 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@xxxxxxxxx.  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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]