diff options
author | Han, Weidong <weidong.han@intel.com> | 2009-04-04 11:21:26 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-04-04 11:41:32 +0200 |
commit | 34aaaa948e3c9dd65b27fa499c5c9e8d8f1227cf (patch) | |
tree | c6834b2bdc46032308f7bcb5cffa7205817841ea /drivers/pci | |
parent | intel-iommu: set compatibility format interrupt (diff) | |
download | linux-34aaaa948e3c9dd65b27fa499c5c9e8d8f1227cf.tar.xz linux-34aaaa948e3c9dd65b27fa499c5c9e8d8f1227cf.zip |
x86, dmar: check if it's initialized before disable queue invalidation
If queue invalidation is disabled after it's already initialized,
dmar_enable_qi won't re-enable it due to iommu->qi is allocated.
It may result in system hang when use queue invalidation. Add this
check to avoid this case.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/intr_remapping.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index ef25caade54b..472be1c3fff0 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c @@ -524,6 +524,13 @@ int __init enable_intr_remapping(int eim) struct intel_iommu *iommu = drhd->iommu; /* + * If the queued invalidation is already initialized, + * shouldn't disable it. + */ + if (iommu->qi) + continue; + + /* * Clear previous faults. */ dmar_fault(-1, iommu); |