diff --git a/[refs] b/[refs] index 2b66e1952d36..0336e02f1a07 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c156e347d6d3c36b6843c3b168eda61b9a02c827 +refs/heads/master: 98383fc301c6546af0f3a8a1d3cb8bf218f7e940 diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index 6c0bd49cee5f..891d713d9c96 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -1636,4 +1636,25 @@ static int amd_iommu_domain_init(struct iommu_domain *dom) return -ENOMEM; } +static void amd_iommu_domain_destroy(struct iommu_domain *dom) +{ + struct protection_domain *domain = dom->priv; + + if (!domain) + return; + + if (domain->dev_cnt > 0) + cleanup_domain(domain); + + BUG_ON(domain->dev_cnt != 0); + + free_pagetable(domain); + + domain_id_free(domain->id); + + kfree(domain); + + dom->priv = NULL; +} + #endif