aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2010-09-15 08:05:46 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-10-13 16:19:21 +1100
commitffa56e555a6e4c205e879636e6cd6104ce03421f (patch)
treef72c66743db9a0d5a4f41193c0a74ee4f1d8190a
parent1cb8e85a9d9da4192acfb5f70a80b0c5ce8c3e8f (diff)
downloadlinux-linaro-android-ffa56e555a6e4c205e879636e6cd6104ce03421f.tar.gz
powerpc/dma: Fix check for direct DMA support
The current check is wrong because it does not take the DMA offset intot account, and in the case of a driver which doesn't actually support 64bits would falsely report that device as working. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/kernel/dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index f368c075c90..cf02cad62d9 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -90,7 +90,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
/* Could be improved so platforms can set the limit in case
* they have limited DMA windows
*/
- return mask >= (memblock_end_of_DRAM() - 1);
+ return mask >= get_dma_offset(dev) + (memblock_end_of_DRAM() - 1);
#else
return 1;
#endif