Re: [V4L] [PATCH/RFC] videodev.[ch] redesign

Mark McClelland
2002-02-11T11:49:00Z

Gerd Knorr wrote:

>On Sun, Feb 10, 2002 at 04:54:48AM -0800, Mark McClelland wrote:
>
>>BTW, is there any chance for vmalloc() and pals to be moved to
>>videodev.c, or something higher-up?
>>
>
>What do you mean exactly? bttv's memory management code, which has
>been copied to various places, and which is now broken in 2.5.x due
>to virt_to_bus() being gone finally?
>

Sorry, I meant to type rvmalloc().

Many drivers (eg. USB webcam drivers), don't need virt_to_bus(). They
only need a way to allocate reserved pages that they can safely do
remap_page_range() on, for mmap().

>Some of this is work-in-progress. I'm talking to Dave to put some
>helper functions to handle DMA to vmalloced memory blocks to some
>sensible place within the kernel. If someone wants to have a look
>(not final yet): http://bytesex.org/patches/15_pci-2.4.18-pre8.diff
>

Thanks, that's exactly what I was looking for. pci_vmalloc_to_page()
should satisfy all of the USB drivers, if they override
vma->vm_ops->nopage().

--
Mark McClelland
mmcclell@bigfoot.com