]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/x86/kernel/amd_iommu_init.c
x86/amd-iommu: Fix passthrough mode
[net-next-2.6.git] / arch / x86 / kernel / amd_iommu_init.c
index 7ffc39965233ce570a7b734f12636ce05e403d1e..df01c691d130cb93e5982f4965182804ca8b9601 100644 (file)
@@ -1274,6 +1274,10 @@ static int __init amd_iommu_init(void)
        if (ret)
                goto free;
 
+       ret = amd_iommu_init_devices();
+       if (ret)
+               goto free;
+
        if (iommu_pass_through)
                ret = amd_iommu_init_passthrough();
        else
@@ -1296,6 +1300,9 @@ out:
        return ret;
 
 free:
+
+       amd_iommu_uninit_devices();
+
        free_pages((unsigned long)amd_iommu_pd_alloc_bitmap,
                   get_order(MAX_DOMAIN_ID/8));