aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorNadav Amit <nadav.amit@gmail.com>2010-04-01 06:24:35 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-04-09 10:38:47 -0400
commit8bdd77dd4ef99292f3d705c4c389c12f55641133 (patch)
tree8e61b8852de3ce09a9b0f352a2c9aeddc6a453b9 /drivers/pci
parenta45946abb8991e17c39326854ed1314d20742ca6 (diff)
intel-iommu mistakenly uses offset_pfn when caching mode is enabled
intel_map_sg used offset_pfn which was set to zero when invalidating the IOTLB. intel_map_sg now uses size variable for this matter. Signed-off-by: Nadav Amit <nadav.amit@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/intel-iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index a0ac7197ffdd..341da41cde8b 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2860,7 +2860,6 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
2860 struct dmar_domain *domain; 2860 struct dmar_domain *domain;
2861 size_t size = 0; 2861 size_t size = 0;
2862 int prot = 0; 2862 int prot = 0;
2863 size_t offset_pfn = 0;
2864 struct iova *iova = NULL; 2863 struct iova *iova = NULL;
2865 int ret; 2864 int ret;
2866 struct scatterlist *sg; 2865 struct scatterlist *sg;
@@ -2914,7 +2913,7 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
2914 2913
2915 /* it's a non-present to present mapping. Only flush if caching mode */ 2914 /* it's a non-present to present mapping. Only flush if caching mode */
2916 if (cap_caching_mode(iommu->cap)) 2915 if (cap_caching_mode(iommu->cap))
2917 iommu_flush_iotlb_psi(iommu, 0, start_vpfn, offset_pfn); 2916 iommu_flush_iotlb_psi(iommu, 0, start_vpfn, size);
2918 else 2917 else
2919 iommu_flush_write_buffer(iommu); 2918 iommu_flush_write_buffer(iommu);
2920 2919