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>

authored by Nishanth Aravamudan and committed by Benjamin Herrenschmidt ffa56e55 1cb8e85a

+1 -1
+1 -1
arch/powerpc/kernel/dma.c
··· 90 90 /* Could be improved so platforms can set the limit in case 91 91 * they have limited DMA windows 92 92 */ 93 - return mask >= (memblock_end_of_DRAM() - 1); 93 + return mask >= get_dma_offset(dev) + (memblock_end_of_DRAM() - 1); 94 94 #else 95 95 return 1; 96 96 #endif