Re: /dev/mem implementation
From: Arjan van de Ven
Date: Mon Jan 18 2010 - 10:16:01 EST
On Mon, 18 Jan 2010 14:18:22 +0200
Felix Rubinstein <felixru@xxxxxxxxx> wrote:
> The usecase is broadcom 10GbE switch driver which maps DMA memory to
> userspace. I can find one more libe1000 which uses char driver to map
> DMA memory to userspace too.
> So, how can I implement userspace drivers in recent kernels which want
> to map DMA memory to userspace if STRICT_DEVMEM or PAT (either of
> them) are enabled.
for these cases the driver should provide it's own mmap method that
exposes only those pages that the hardware has access to. You need
something like this anyway to deal with the dma mapping api....
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
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/