diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-07-23 16:04:37 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-23 16:04:37 +0200 |
commit | cbb24a25a871cbdac4e58b68b541aadd91b249be (patch) | |
tree | 0b8207913c437d91c938a64a48c1a1751a31a37b /drivers/iommu/dmar.c | |
parent | iommu/vt-d: Suppress compiler warnings (diff) | |
parent | iommu: Fix IOMMU sysfs stubs (diff) | |
download | linux-cbb24a25a871cbdac4e58b68b541aadd91b249be.tar.xz linux-cbb24a25a871cbdac4e58b68b541aadd91b249be.zip |
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); |