diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2010-09-15 12:05:46 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-10-13 09:19:21 +0400 |
commit | ffa56e555a6e4c205e879636e6cd6104ce03421f (patch) | |
tree | f72c66743db9a0d5a4f41193c0a74ee4f1d8190a /arch/powerpc/kernel/dma.c | |
parent | 1cb8e85a9d9da4192acfb5f70a80b0c5ce8c3e8f (diff) | |
download | linux-ffa56e555a6e4c205e879636e6cd6104ce03421f.tar.xz |
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>
Diffstat (limited to 'arch/powerpc/kernel/dma.c')
-rw-r--r-- | arch/powerpc/kernel/dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index f368c075c90b..cf02cad62d9a 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 |