Re: [PATCH 2.6.15-rc4 1/1] cpia: use vm_insert_page() instead of remap_pfn_range()

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

 



>  	pos = (unsigned long)(cam->frame_buf);
>  	while (size > 0) {
> -		page = vmalloc_to_pfn((void *)pos);
> -		if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
> +		page = vmalloc_to_page((void *)pos);
> +		if (vm_insert_page(vma, start, page)) {

it would be nicer to do the arithmetis on pos as pointers rather than unsigned
long.  Also you might want to use alloc_pages + vmap instead of vmalloc so that
you already have a page array.  Or we should provide a helper that walks over
a vmalloc'ed region and calls vmalloc_to_page + vm_insert_page.  Either way
this type of code is duplicated far too much and we'd really need some better
interface for it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux