diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 20a60d661ba8..ccf129d47d84 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/lmb.h> | ||
10 | #include <asm/bug.h> | 11 | #include <asm/bug.h> |
11 | #include <asm/abs_addr.h> | 12 | #include <asm/abs_addr.h> |
12 | 13 | ||
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg, | |||
90 | static int dma_direct_dma_supported(struct device *dev, u64 mask) | 91 | static int dma_direct_dma_supported(struct device *dev, u64 mask) |
91 | { | 92 | { |
92 | #ifdef CONFIG_PPC64 | 93 | #ifdef CONFIG_PPC64 |
93 | /* Could be improved to check for memory though it better be | 94 | /* Could be improved so platforms can set the limit in case |
94 | * done via some global so platforms can set the limit in case | ||
95 | * they have limited DMA windows | 95 | * they have limited DMA windows |
96 | */ | 96 | */ |
97 | return mask >= DMA_BIT_MASK(32); | 97 | return mask >= (lmb_end_of_DRAM() - 1); |
98 | #else | 98 | #else |
99 | return 1; | 99 | return 1; |
100 | #endif | 100 | #endif |