diff options
Diffstat (limited to 'arch/x86_64/kernel/pci-gart.c')
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index fc1960f1f243..030eb3753358 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -185,7 +185,7 @@ static void iommu_full(struct device *dev, size_t size, int dir) | |||
185 | static inline int need_iommu(struct device *dev, unsigned long addr, size_t size) | 185 | static inline int need_iommu(struct device *dev, unsigned long addr, size_t size) |
186 | { | 186 | { |
187 | u64 mask = *dev->dma_mask; | 187 | u64 mask = *dev->dma_mask; |
188 | int high = addr + size >= mask; | 188 | int high = addr + size > mask; |
189 | int mmu = high; | 189 | int mmu = high; |
190 | if (force_iommu) | 190 | if (force_iommu) |
191 | mmu = 1; | 191 | mmu = 1; |
@@ -195,7 +195,7 @@ static inline int need_iommu(struct device *dev, unsigned long addr, size_t size | |||
195 | static inline int nonforced_iommu(struct device *dev, unsigned long addr, size_t size) | 195 | static inline int nonforced_iommu(struct device *dev, unsigned long addr, size_t size) |
196 | { | 196 | { |
197 | u64 mask = *dev->dma_mask; | 197 | u64 mask = *dev->dma_mask; |
198 | int high = addr + size >= mask; | 198 | int high = addr + size > mask; |
199 | int mmu = high; | 199 | int mmu = high; |
200 | return mmu; | 200 | return mmu; |
201 | } | 201 | } |