aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-01 15:06:21 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-01 15:06:21 -0400
commit3d58f48ba05caed9118bce62b3047f8683438835 (patch)
tree94c911034f0e14ded73d3e9e6e9f8e22b6cad822 /drivers/pci/intel-iommu.c
parentabfe0af9813153bae8c85d9bac966bafcb8ddab1 (diff)
parentd9244b5d2fbfe9fa540024b410047af13ceec90f (diff)
Merge branch 'linus' into irq/numa
Conflicts: arch/mips/sibyte/bcm1480/irq.c arch/mips/sibyte/sb1250/irq.c Merge reason: we gathered a few conflicts plus update to latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 9ce8f0764be..cd389162735 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -59,6 +59,10 @@
59#define DMA_32BIT_PFN IOVA_PFN(DMA_BIT_MASK(32)) 59#define DMA_32BIT_PFN IOVA_PFN(DMA_BIT_MASK(32))
60#define DMA_64BIT_PFN IOVA_PFN(DMA_BIT_MASK(64)) 60#define DMA_64BIT_PFN IOVA_PFN(DMA_BIT_MASK(64))
61 61
62#ifndef PHYSICAL_PAGE_MASK
63#define PHYSICAL_PAGE_MASK PAGE_MASK
64#endif
65
62/* global iommu list, set NULL for ignored DMAR units */ 66/* global iommu list, set NULL for ignored DMAR units */
63static struct intel_iommu **g_iommus; 67static struct intel_iommu **g_iommus;
64 68
@@ -1216,7 +1220,7 @@ static void dmar_init_reserved_ranges(void)
1216 if (!r->flags || !(r->flags & IORESOURCE_MEM)) 1220 if (!r->flags || !(r->flags & IORESOURCE_MEM))
1217 continue; 1221 continue;
1218 addr = r->start; 1222 addr = r->start;
1219 addr &= PAGE_MASK; 1223 addr &= PHYSICAL_PAGE_MASK;
1220 size = r->end - addr; 1224 size = r->end - addr;
1221 size = PAGE_ALIGN(size); 1225 size = PAGE_ALIGN(size);
1222 iova = reserve_iova(&reserved_iova_list, IOVA_PFN(addr), 1226 iova = reserve_iova(&reserved_iova_list, IOVA_PFN(addr),
@@ -2164,7 +2168,8 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
2164 * is not a big problem 2168 * is not a big problem
2165 */ 2169 */
2166 ret = domain_page_mapping(domain, start_paddr, 2170 ret = domain_page_mapping(domain, start_paddr,
2167 ((u64)paddr) & PAGE_MASK, size, prot); 2171 ((u64)paddr) & PHYSICAL_PAGE_MASK,
2172 size, prot);
2168 if (ret) 2173 if (ret)
2169 goto error; 2174 goto error;
2170 2175
@@ -2454,8 +2459,8 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
2454 addr = page_to_phys(sg_page(sg)) + sg->offset; 2459 addr = page_to_phys(sg_page(sg)) + sg->offset;
2455 size = aligned_size((u64)addr, sg->length); 2460 size = aligned_size((u64)addr, sg->length);
2456 ret = domain_page_mapping(domain, start_addr + offset, 2461 ret = domain_page_mapping(domain, start_addr + offset,
2457 ((u64)addr) & PAGE_MASK, 2462 ((u64)addr) & PHYSICAL_PAGE_MASK,
2458 size, prot); 2463 size, prot);
2459 if (ret) { 2464 if (ret) {
2460 /* clear the page */ 2465 /* clear the page */
2461 dma_pte_clear_range(domain, start_addr, 2466 dma_pte_clear_range(domain, start_addr,