diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-07-23 18:04:37 +0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-23 18:04:37 +0400 |
commit | cbb24a25a871cbdac4e58b68b541aadd91b249be (patch) | |
tree | 0b8207913c437d91c938a64a48c1a1751a31a37b /drivers/iommu/dmar.c | |
parent | aa4d066a2a8041b7e73cee68ce5499aca29f265e (diff) | |
parent | e09f8ea560490e941139d23b4c278d3e6e2c871a (diff) | |
download | linux-cbb24a25a871cbdac4e58b68b541aadd91b249be.tar.xz |
Merge branch 'core' into x86/vt-d
Conflicts:
drivers/iommu/intel-iommu.c
Diffstat (limited to 'drivers/iommu/dmar.c')
-rw-r--r-- | drivers/iommu/dmar.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index f2eb0bc419f8..4306885f48b1 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c @@ -38,6 +38,7 @@ #include <linux/tboot.h> #include <linux/dmi.h> #include <linux/slab.h> +#include <linux/iommu.h> #include <asm/irq_remapping.h> #include <asm/iommu_table.h> @@ -980,6 +981,12 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) raw_spin_lock_init(&iommu->register_lock); drhd->iommu = iommu; + + if (intel_iommu_enabled) + iommu->iommu_dev = iommu_device_create(NULL, iommu, + intel_iommu_groups, + iommu->name); + return 0; err_unmap: @@ -991,6 +998,8 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) static void free_iommu(struct intel_iommu *iommu) { + iommu_device_destroy(iommu->iommu_dev); + if (iommu->irq) { free_irq(iommu->irq, iommu); irq_set_handler_data(iommu->irq, NULL); |