On Wed, Aug 12, 2009 at 12:57:58AM +0200, Ithamar R. Adema wrote:
> For now, I've found a simple workaround by changing remap_pfn_range in
> mm/nommu.c from
>
> vma->vm_start = vma->vm_pgoff << PAGE_SHIFT;
>
>
> to
>
> vma->vm_start += vma->vm_pgoff << PAGE_SHIFT;
I don't think remap_pfn_range has to do anything besides validating the
parameters on nommu.
What do you think about this version?:
int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
unsigned long to, unsigned long size, pgprot_t prot)
{
if (vma->vm_start > from || vma->vm_end <= from)
return -EINVAL;
if (size > (vma->vm_end - from) >> PAGE_SHIFT)
return -EINVAL;
/*
* add arch callback here to modify "to" based on "prot"
* for uncached memory mirrors, etc.
*/
if (from != to << PAGE_SHIFT)
return -EINVAL;
return 0;
}
Daniel
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev