Re: can device drivers return non-ram via vm_ops->nopage?
From: Russell King
Date: Sat Mar 20 2004 - 18:59:12 EST
On Sat, Mar 20, 2004 at 02:45:18PM -0800, William Lee Irwin III wrote:
> Is there any possibility of an extension to remap_area_pages() that
> could resolve this? I can't say I fully understood and/or remember
> the issue with it that you pointed out.
The issues are:
1. ALSA wants to mmap the buffer used to transfer data to/from the
card into user space. This buffer may be direct-mapped RAM,
memory allocated via dma_alloc_coherent(), an on-device buffer,
or anything else.
The user space mapping must likewise be DMA-coherent.
Currently, ALSA just does virt_to_page() on whatever address it
feels like in its nopage() function, which is obviously not
acceptable for two out of the three specific cases above.
2. ALSA wants to _coherently_ share data between the kernel-side
drivers, and user space ALSA library, mainly the DMA buffer
head/tail pointers so both kernel space and user space knows
when the buffer is full/empty.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/