Re: can device drivers return non-ram via vm_ops->nopage?

From: Linus Torvalds
Date: Sun Mar 21 2004 - 22:30:38 EST




On Mon, 22 Mar 2004, David Woodhouse wrote:
>
> You are assuming that dma_alloc_coherent() will always return memory of
> that second kind -- host-side RAM, not PCI-side. That hasn't previously
> been a requirement, and there are machines out there on which it makes a
> lot more sense for dma_alloc_coherent() to use some SRAM which happens
> to be hanging off the I/O bus than it does to use host RAM.

So? Those architectures can just allocate "struct page" entries for that
memory too.

There is a point where we should not care about idiotic architectures any
more. We should care about what happens in 99% of all architectures, and
the rest get to work around their _own_ quirks. We do not make the VM
uglier for some insane "it can happen" case.

Linus
-
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/