Thread (41 messages) flat view 41 messages, 6 authors, 2011-11-11

[PATCH v8 16/16] ARM: LPAE: Add the Kconfig entries

From: Russell King - ARM Linux <hidden>
Date: 2011-11-11 13:24:29
Also in: lkml

On Fri, Nov 11, 2011 at 11:46:14AM +0000, Catalin Marinas wrote:
So we could change this to:

config ARCH_DMA_ADDR_T_64BIT
	depends on ARM_LPAE

and let platforms select it.
Actually, even this is conceptually wrong.  You really need to get away
from the thought that a dma address in any way is encapsulated within
the machine physical address.

They're two separate things.  For example, you could have an ARMv4 based
system (so, 32-bit address bus) connected to a PCI bridge which supports
64-bit addressing.  This PCI bridge could map system memory into PCI
space greater than 4GB (ok, there are down-sides to doing this, but this
is just an example to illustrate the point).  This would therefore require
a 64-bit dma_addr_t.

The size of dma_addr_t has very little to do with the page table format
or even the host address bus width, and is more to do with bus and
system setup than host CPU setup.

So, I think that we can have:

config ARCH_DMA_ADDR_T_64BIT
	bool

and we just leave it at that - if a platform needs 64-bit DMA addresses,
then selecting this symbol would be the correct approach.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help