Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Aug 10, 2009
2 parents 04e3535 + b2f2e8f commit 2c661a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2c661a6

Please sign in to comment.