mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
This commit is contained in:
parent
161fde083f
commit
34aaaa948e
1 changed files with 7 additions and 0 deletions
|
|
@ -523,6 +523,13 @@ int __init enable_intr_remapping(int eim)
|
|||
for_each_drhd_unit(drhd) {
|
||||
struct intel_iommu *iommu = drhd->iommu;
|
||||
|
||||
/*
|
||||
* If the queued invalidation is already initialized,
|
||||
* shouldn't disable it.
|
||||
*/
|
||||
if (iommu->qi)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Clear previous faults.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue