diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2010-10-18 11:27:04 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-12-09 07:17:50 +0300 |
commit | b3c73856ae47d43d0d181f9de1c1c6c0820c4515 (patch) | |
tree | e7528ed3ed14b57f5861edb528c86adb1c66c393 /arch/powerpc/kernel/dma-iommu.c | |
parent | 56d8adc5695a8d3f070c8498d532389580af5611 (diff) | |
download | linux-b3c73856ae47d43d0d181f9de1c1c6c0820c4515.tar.xz |
powerpc/iommu: Use coherent_dma_mask for alloc_coherent
The IOMMU code has been passing the dma-mask instead of the
coherent_dma_mask to the iommu allocator. Coherent allocations should
be made using the coherent_dma_mask.
Also update the vio code to ensure the coherent_dma_mask is set. Without
this change drivers, such as ibmvscsi, fail to load with the corrected
dma_iommu_alloc_coherent().
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>
Diffstat (limited to 'arch/powerpc/kernel/dma-iommu.c')
-rw-r--r-- | arch/powerpc/kernel/dma-iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 6e54a0fd31aa..e7554154a6de 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c @@ -19,7 +19,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) { return iommu_alloc_coherent(dev, get_iommu_table_base(dev), size, - dma_handle, device_to_mask(dev), flag, + dma_handle, dev->coherent_dma_mask, flag, dev_to_node(dev)); } |