iommu/amd: Initialize device table after dma_ops
authorShuah Khan <shuah.khan@hp.com>
Thu, 28 Feb 2013 21:39:50 +0000 (14:39 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 20 Mar 2013 15:03:26 +0000 (15:03 +0000)
commit8c92cb1f49bd56a28c38315103dea7b0dd792027
tree7b62ad4fbdc23fa0d40b8763429315b4e3b527e2
parentfea5417579faa777befe2ad4f111e3fa6f2675b1
iommu/amd: Initialize device table after dma_ops

commit f528d980c17b8714aedc918ba86e058af914d66b upstream.

When dma_ops are initialized the unity mappings are created. The
init_device_table_dma() function makes sure DMA from all devices is
blocked by default. This opens a short window in time where DMA to
unity mapped regions is blocked by the IOMMU. Make sure this does not
happen by initializing the device table after dma_ops.

Tested on 3.2.38

Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/iommu/amd_iommu_init.c