summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 18:11:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 18:11:18 -0800
commit5066e4a34081dd82fb625f2f382bfa29ca421a3f (patch)
tree9c622bb39bd6d5edd42e56dfe5c0778d1216c72d
parentb4642c109f9bbf62b2ee10babf5c4221c48480aa (diff)
parentc37a01779b3954d9c8f9ac4f663a03c11f69fded (diff)
downloadtalos-obmc-linux-5066e4a34081dd82fb625f2f382bfa29ca421a3f.tar.gz
talos-obmc-linux-5066e4a34081dd82fb625f2f382bfa29ca421a3f.zip
Merge tag 'iommu-fix-v4.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU fix from Joerg Roedel: "Fix a boot crash caused by the VT-d driver when booted with IOMMU disabled. This was introduced with the recent IOMMU changes" * tag 'iommu-fix-v4.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix crash on boot when DMAR is disabled
-rw-r--r--drivers/iommu/dmar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index d9c0decfc91a..36e3f430d265 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1108,8 +1108,10 @@ error:
static void free_iommu(struct intel_iommu *iommu)
{
- iommu_device_sysfs_remove(&iommu->iommu);
- iommu_device_unregister(&iommu->iommu);
+ if (intel_iommu_enabled) {
+ iommu_device_unregister(&iommu->iommu);
+ iommu_device_sysfs_remove(&iommu->iommu);
+ }
if (iommu->irq) {
if (iommu->pr_irq) {
OpenPOWER on IntegriCloud