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

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Nov 11 08:24:15 EST 2011


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.



More information about the linux-arm-kernel mailing list