Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373558
b: refs/heads/master
c: a0e191b
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Apr 18, 2013
1 parent a78531d commit afc4ecb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 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: 925fe08bce38d1ff052fe2209b9e2b8d5fbb7f98
refs/heads/master: a0e191b23d93464bf8726eba8da081d23c08e185
22 changes: 1 addition & 21 deletions trunk/drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2841,24 +2841,6 @@ static void unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size,
spin_unlock_irqrestore(&domain->lock, flags);
}

/*
* This is a special map_sg function which is used if we should map a
* device which is not handled by an AMD IOMMU in the system.
*/
static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist,
int nelems, int dir)
{
struct scatterlist *s;
int i;

for_each_sg(sglist, s, nelems, i) {
s->dma_address = (dma_addr_t)sg_phys(s);
s->dma_length = s->length;
}

return nelems;
}

/*
* The exported map_sg function for dma_ops (handles scatter-gather
* lists).
Expand All @@ -2878,9 +2860,7 @@ static int map_sg(struct device *dev, struct scatterlist *sglist,
INC_STATS_COUNTER(cnt_map_sg);

domain = get_domain(dev);
if (PTR_ERR(domain) == -EINVAL)
return map_sg_no_iommu(dev, sglist, nelems, dir);
else if (IS_ERR(domain))
if (IS_ERR(domain))
return 0;

dma_mask = *dev->dma_mask;
Expand Down

0 comments on commit afc4ecb

Please sign in to comment.