projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c156e34
)
AMD IOMMU: add domain destroy function for IOMMU API
author
Joerg Roedel
<joerg.roedel@amd.com>
Tue, 2 Dec 2008 17:34:12 +0000
(18:34 +0100)
committer
Joerg Roedel
<joerg.roedel@amd.com>
Sat, 3 Jan 2009 13:11:55 +0000
(14:11 +0100)
Impact: add a generic function for releasing protection domains
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kernel/amd_iommu.c
b/arch/x86/kernel/amd_iommu.c
index 6c0bd49cee5f25dfcbf22066168dd9cac4284657..891d713d9c96ccc810c7d0801c05bfad9789d980 100644
(file)
--- a/
arch/x86/kernel/amd_iommu.c
+++ b/
arch/x86/kernel/amd_iommu.c
@@
-1636,4
+1636,25
@@
out_free:
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