iommu/amd: Initialize device table after dma_ops
authorJoerg Roedel <joro@8bytes.org>
Wed, 6 Feb 2013 11:55:23 +0000 (12:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Mar 2013 22:09:03 +0000 (06:09 +0800)
commitffbf1423cc7e8ed018d0ba8fbe3f9f3bb816fa4c
tree878215e4c8bf88447ecf4790295e8ecb0f0fb4ee
parent1adbb5db21a1e08537061607abc9b0a9e7e12848
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.

Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/amd_iommu_init.c