diff options
| author | Shuah Khan <shuah.khan@hp.com> | 2012-06-06 12:50:06 -0400 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-06-07 06:11:21 -0400 |
| commit | f2f12b6fc032c7b1419fd6db84e2868b5f05a878 (patch) | |
| tree | 930c98722adb84eabf64830a2192efe7a31155bc | |
| parent | eee53537c476c947bf7faa1c916d2f5a0ae8ec93 (diff) | |
iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
The iommu_shutdown callback is not initialized when the AMD
IOMMU driver runs in passthrough mode. Fix that by moving
the callback initialization before the check for
passthrough mode.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| -rw-r--r-- | drivers/iommu/amd_iommu_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 542024ba6dba..c04ddca7f12f 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c | |||
| @@ -1641,6 +1641,8 @@ static int __init amd_iommu_init(void) | |||
| 1641 | 1641 | ||
| 1642 | amd_iommu_init_api(); | 1642 | amd_iommu_init_api(); |
| 1643 | 1643 | ||
| 1644 | x86_platform.iommu_shutdown = disable_iommus; | ||
| 1645 | |||
| 1644 | if (iommu_pass_through) | 1646 | if (iommu_pass_through) |
| 1645 | goto out; | 1647 | goto out; |
| 1646 | 1648 | ||
| @@ -1649,8 +1651,6 @@ static int __init amd_iommu_init(void) | |||
| 1649 | else | 1651 | else |
| 1650 | printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n"); | 1652 | printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n"); |
| 1651 | 1653 | ||
| 1652 | x86_platform.iommu_shutdown = disable_iommus; | ||
| 1653 | |||
| 1654 | out: | 1654 | out: |
| 1655 | return ret; | 1655 | return ret; |
| 1656 | 1656 | ||
