Hi,
I'm a little confused as to how to write drivers that require
remap_pfn_range on mmu Linux to function on nommu as well.

The current nommu implementation looks like this:

int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
                    unsigned long to, unsigned long size, pgprot_t prot)
{
        vma->vm_start = vma->vm_pgoff << PAGE_SHIFT;
        return 0;
}

It's strange to see vm_pgoff being used to define the start of the area.
IMHO this should only be used for /dev/mem. In all other cases this is
not related to the absolute address. And not changing vm_end will
effectively change the size of the area.

But is remap_pfn_range supposed to change vm_start at all?
Shouldn't this, on nommu, consist only of checks if the size bytes starting
at "from" and "to << PAGE_SHIFT" are inside vma?
vm_start and vm_end are already at their designated value after mmap has
called get_unmapped_area..

  Daniel
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to