diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-07-23 10:04:37 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-23 10:04:37 -0400 |
commit | cbb24a25a871cbdac4e58b68b541aadd91b249be (patch) | |
tree | 0b8207913c437d91c938a64a48c1a1751a31a37b /drivers/iommu/dmar.c | |
parent | aa4d066a2a8041b7e73cee68ce5499aca29f265e (diff) | |
parent | e09f8ea560490e941139d23b4c278d3e6e2c871a (diff) |
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 @@ | |||
38 | #include <linux/tboot.h> | 38 | #include <linux/tboot.h> |
39 | #include <linux/dmi.h> | 39 | #include <linux/dmi.h> |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/iommu.h> | ||
41 | #include <asm/irq_remapping.h> | 42 | #include <asm/irq_remapping.h> |
42 | #include <asm/iommu_table.h> | 43 | #include <asm/iommu_table.h> |
43 | 44 | ||
@@ -980,6 +981,12 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) | |||
980 | raw_spin_lock_init(&iommu->register_lock); | 981 | raw_spin_lock_init(&iommu->register_lock); |
981 | 982 | ||
982 | drhd->iommu = iommu; | 983 | drhd->iommu = iommu; |
984 | |||
985 | if (intel_iommu_enabled) | ||
986 | iommu->iommu_dev = iommu_device_create(NULL, iommu, | ||
987 | intel_iommu_groups, | ||
988 | iommu->name); | ||
989 | |||
983 | return 0; | 990 | return 0; |
984 | 991 | ||
985 | err_unmap: | 992 | err_unmap: |
@@ -991,6 +998,8 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) | |||
991 | 998 | ||
992 | static void free_iommu(struct intel_iommu *iommu) | 999 | static void free_iommu(struct intel_iommu *iommu) |
993 | { | 1000 | { |
1001 | iommu_device_destroy(iommu->iommu_dev); | ||
1002 | |||
994 | if (iommu->irq) { | 1003 | if (iommu->irq) { |
995 | free_irq(iommu->irq, iommu); | 1004 | free_irq(iommu->irq, iommu); |
996 | irq_set_handler_data(iommu->irq, NULL); | 1005 | irq_set_handler_data(iommu->irq, NULL); |