Daniel Glöckner wrote:
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;
}

This looks good, though dma_mmap() in arch/arm/mm/consistent-nommu.c passes wrong parameters and fail :( I'll take a closer look at this during the weekend...

Ithamar Adema
http://www.team-embedded.nl

_______________________________________________
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

Reply via email to