]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/iommu: Add additional checks when changing iommu mask
authorMilton Miller <miltonm@bga.com>
Wed, 11 May 2011 12:24:57 +0000 (12:24 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 19 May 2011 07:25:27 +0000 (17:25 +1000)
commit4d4a594ffdb9d035ae95366222b97c05f0d8f2a6
tree85cc5cfa796ae856213c46ba1817399d7beb5009
parentdfc24d6d8820f1c183456b938ce65a92ce1e73b9
powerpc/pseries/iommu: Add additional checks when changing iommu mask

Do not check dma supported until we have chosen the right dma ops.
Check that the device is pci before treating it as such.

Check the mask is supported by the selected dma ops before
committing it.

We only need to set iommu ops if it is not the current ops; this
avoids searching the tree for the iommu table unnecessarily.

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>
arch/powerpc/platforms/pseries/iommu.c