aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/dmar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r--drivers/pci/dmar.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index d3d86b749eee..10a071ba3232 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -723,23 +723,16 @@ void qi_global_iec(struct intel_iommu *iommu)
723 qi_submit_sync(&desc, iommu); 723 qi_submit_sync(&desc, iommu);
724} 724}
725 725
726int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, u8 fm, 726void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, u8 fm,
727 u64 type, int non_present_entry_flush) 727 u64 type)
728{ 728{
729 struct qi_desc desc; 729 struct qi_desc desc;
730 730
731 if (non_present_entry_flush) {
732 if (!cap_caching_mode(iommu->cap))
733 return 1;
734 else
735 did = 0;
736 }
737
738 desc.low = QI_CC_FM(fm) | QI_CC_SID(sid) | QI_CC_DID(did) 731 desc.low = QI_CC_FM(fm) | QI_CC_SID(sid) | QI_CC_DID(did)
739 | QI_CC_GRAN(type) | QI_CC_TYPE; 732 | QI_CC_GRAN(type) | QI_CC_TYPE;
740 desc.high = 0; 733 desc.high = 0;
741 734
742 return qi_submit_sync(&desc, iommu); 735 qi_submit_sync(&desc, iommu);
743} 736}
744 737
745int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, 738int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,