Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144842
b: refs/heads/master
c: fd18de5
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse authored and Linus Torvalds committed May 11, 2009
1 parent 3bdd71c commit 84a8f3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4d7749be5de4a7261bcbe3c7d96c748792ec455
refs/heads/master: fd18de50b9e7965f93d231e7390436fb8900c0e6
13 changes: 9 additions & 4 deletions trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
#define DMA_32BIT_PFN IOVA_PFN(DMA_BIT_MASK(32))
#define DMA_64BIT_PFN IOVA_PFN(DMA_BIT_MASK(64))

#ifndef PHYSICAL_PAGE_MASK
#define PHYSICAL_PAGE_MASK PAGE_MASK
#endif

/* global iommu list, set NULL for ignored DMAR units */
static struct intel_iommu **g_iommus;

Expand Down Expand Up @@ -1216,7 +1220,7 @@ static void dmar_init_reserved_ranges(void)
if (!r->flags || !(r->flags & IORESOURCE_MEM))
continue;
addr = r->start;
addr &= PAGE_MASK;
addr &= PHYSICAL_PAGE_MASK;
size = r->end - addr;
size = PAGE_ALIGN(size);
iova = reserve_iova(&reserved_iova_list, IOVA_PFN(addr),
Expand Down Expand Up @@ -2173,7 +2177,8 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
* is not a big problem
*/
ret = domain_page_mapping(domain, start_paddr,
((u64)paddr) & PAGE_MASK, size, prot);
((u64)paddr) & PHYSICAL_PAGE_MASK,
size, prot);
if (ret)
goto error;

Expand Down Expand Up @@ -2463,8 +2468,8 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
addr = page_to_phys(sg_page(sg)) + sg->offset;
size = aligned_size((u64)addr, sg->length);
ret = domain_page_mapping(domain, start_addr + offset,
((u64)addr) & PAGE_MASK,
size, prot);
((u64)addr) & PHYSICAL_PAGE_MASK,
size, prot);
if (ret) {
/* clear the page */
dma_pte_clear_range(domain, start_addr,
Expand Down

0 comments on commit 84a8f3b

Please sign in to comment.