]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ARM: DMA-API: better handing of DMA masks for coherent allocations
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 9 Jul 2013 11:14:49 +0000 (12:14 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 14 Oct 2013 15:18:52 +0000 (16:18 +0100)
commitb16ad9f971ecbf3e22bfa80da6f9e63aeba6c9c8
treece24234ca7e65ac07afc4ab48618791587ab56ba
parentc72906ba89a402d7f4d27e12f5e177d3cb535888
ARM: DMA-API: better handing of DMA masks for coherent allocations

We need to start treating DMA masks as something which is specific to
the bus that the device resides on, otherwise we're going to hit all
sorts of nasty issues with LPAE and 32-bit DMA controllers in >32-bit
systems, where memory is offset from PFN 0.

In order to start doing this, we convert the DMA mask to a PFN using
the device specific dma_to_pfn() macro.  This is the reverse of the
pfn_to_dma() macro which is used to get the DMA address for the device.

This gives us a PFN mask, which we can then check against the PFN
limit of the DMA zone.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/dma-mapping.c
arch/arm/mm/init.c
arch/arm/mm/mm.h