linux-stable-rt/arch/powerpc
Milton Miller 6a5c7be5e4 powerpc: Override dma_get_required_mask by platform hook and ops
The hook dma_get_required_mask is supposed to return the mask required
by the platform to operate efficently.  The generic version of
dma_get_required_mask in driver/base/platform.c returns a mask based
only on max_pfn.  However, this is likely too big for iommu systems
and could be too small for platforms that require a dma offset or have
a secondary window at a high offset.

Override the default, provide a hook in ppc_md used by pseries lpar and
cell, and provide the default answer based on memblock_end_of_DRAM(),
with hooks for get_dma_offset, and provide an implementation for iommu
that looks at the defined table size.  Coverting from the end address
to the required bit mask is based on the generic implementation.

The need for this was discovered when the qla2xxx driver switched to
64 bit dma then reverted to 32 bit when dma_get_required_mask said
32 bits was sufficient.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Cc: benh@kernel.crashing.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-09-01 16:00:19 +10:00
..
boot powerpc/40x: Remove obsolete HCU4 board 2011-08-11 13:56:43 -04:00
configs powerpc/40x: Remove obsolete HCU4 board 2011-08-11 13:56:43 -04:00
include/asm powerpc: Override dma_get_required_mask by platform hook and ops 2011-09-01 16:00:19 +10:00
kernel powerpc: Override dma_get_required_mask by platform hook and ops 2011-09-01 16:00:19 +10:00
kvm powerpc/kvm: Fix build errors with older toolchains 2011-08-05 14:47:56 +10:00
lib
math-emu
mm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00
net net: filter: BPF 'JIT' compiler for PPC64 2011-07-21 12:38:32 -07:00
oprofile
platforms powerpc: Override dma_get_required_mask by platform hook and ops 2011-09-01 16:00:19 +10:00
sysdev Merge remote-tracking branch 'jwb/next' into next 2011-08-30 15:14:46 +10:00
xmon
Kconfig powerpc/44x: Kexec support for PPC440X chipsets 2011-08-11 13:50:37 -04:00
Kconfig.debug
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00
relocs_check.pl