aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2011-05-30 19:22:52 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-06-01 07:48:21 -0400
commit70e535d1e5d1e4317e894d6228b762cf9c3fbc6a (patch)
tree2c7ed5f263440c6a7302c19a31827488eade9ea5 /drivers/pci
parent8519dc4401ddf8a5399f979870bbeeadbc111186 (diff)
intel-iommu: Fix off-by-one in RMRR setup
We were mapping an extra byte (and hence usually an extra page): iommu_prepare_identity_map() expects to be given an 'end' argument which is the last byte to be mapped; not the first byte *not* to be mapped. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/intel-iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index b0c96d390802..a8867bd745e2 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2147,7 +2147,7 @@ static inline int iommu_prepare_rmrr_dev(struct dmar_rmrr_unit *rmrr,
2147 if (pdev->dev.archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO) 2147 if (pdev->dev.archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO)
2148 return 0; 2148 return 0;
2149 return iommu_prepare_identity_map(pdev, rmrr->base_address, 2149 return iommu_prepare_identity_map(pdev, rmrr->base_address,
2150 rmrr->end_address + 1); 2150 rmrr->end_address);
2151} 2151}
2152 2152
2153#ifdef CONFIG_DMAR_FLOPPY_WA 2153#ifdef CONFIG_DMAR_FLOPPY_WA
@@ -2161,7 +2161,7 @@ static inline void iommu_prepare_isa(void)
2161 return; 2161 return;
2162 2162
2163 printk(KERN_INFO "IOMMU: Prepare 0-16MiB unity mapping for LPC\n"); 2163 printk(KERN_INFO "IOMMU: Prepare 0-16MiB unity mapping for LPC\n");
2164 ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024); 2164 ret = iommu_prepare_identity_map(pdev, 0, 16*1024*1024 - 1);
2165 2165
2166 if (ret) 2166 if (ret)
2167 printk(KERN_ERR "IOMMU: Failed to create 0-16MiB identity map; " 2167 printk(KERN_ERR "IOMMU: Failed to create 0-16MiB identity map; "