summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-10 08:59:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-10 08:59:56 -0700
commit2c661a669b3e2e34311d7965271a628671191e45 (patch)
tree661f8ed4913a3d98c1a620e66a408f2262bf4bb0 /arch
parent04e35357e2e3ff4e0cabd6468354cf3dbfeb4f27 (diff)
parentb2f2e8fee3d62f621e795f25b2fc0f51bbdb4af9 (diff)
downloadop-kernel-dev-2c661a669b3e2e34311d7965271a628671191e45.zip
op-kernel-dev-2c661a669b3e2e34311d7965271a628671191e45.tar.gz
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/dma: pci_set_dma_mask() shouldn't fail if mask fits in RAM
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/dma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 20a60d6..ccf129d 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -7,6 +7,7 @@
#include <linux/device.h>
#include <linux/dma-mapping.h>
+#include <linux/lmb.h>
#include <asm/bug.h>
#include <asm/abs_addr.h>
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg,
static int dma_direct_dma_supported(struct device *dev, u64 mask)
{
#ifdef CONFIG_PPC64
- /* Could be improved to check for memory though it better be
- * done via some global so platforms can set the limit in case
+ /* Could be improved so platforms can set the limit in case
* they have limited DMA windows
*/
- return mask >= DMA_BIT_MASK(32);
+ return mask >= (lmb_end_of_DRAM() - 1);
#else
return 1;
#endif
OpenPOWER on IntegriCloud