]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/swiotlb: Fix off by one in determining boundary of which ops to use
authorKumar Gala <galak@kernel.crashing.org>
Mon, 3 May 2010 12:36:22 +0000 (07:36 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Tue, 4 May 2010 06:27:18 +0000 (01:27 -0500)
commit1a948d2614fc7c04378bf080ba4e18d8bad0c849
tree2891c2ee4396a5f3939a705cc720dcb3518a7afb
parent8bdaf5c0ae1ac4a9355b3822e3eb73650e0c9096
powerpc/swiotlb: Fix off by one in determining boundary of which ops to use

When we compare the devices DMA mask to the amount of memory we need to
make sure we treat the DMA mask as an address boundary.  For example if
the DMA_MASK(32) and we have 4G of memory we'd incorrectly set the dma
ops to swiotlb.  We need to add one to the dma mask when we convert it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/kernel/dma-swiotlb.c