Commit 5066e4a3 authored by Linus Torvalds's avatar Linus Torvalds

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
parents b4642c10 c37a0177
...@@ -1108,8 +1108,10 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) ...@@ -1108,8 +1108,10 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
static void free_iommu(struct intel_iommu *iommu) static void free_iommu(struct intel_iommu *iommu)
{ {
iommu_device_sysfs_remove(&iommu->iommu); if (intel_iommu_enabled) {
iommu_device_unregister(&iommu->iommu); iommu_device_unregister(&iommu->iommu);
iommu_device_sysfs_remove(&iommu->iommu);
}
if (iommu->irq) { if (iommu->irq) {
if (iommu->pr_irq) { if (iommu->pr_irq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment