Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125640
b: refs/heads/master
c: 5774f7c
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Jan 3, 2009
1 parent 3f845ee commit 39ac243
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18811f55d48e5f3ee70c4744c592f940022fa592
refs/heads/master: 5774f7c5fef2526bfa58eab628fbe91dce5e07b1
6 changes: 6 additions & 0 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ DECLARE_STATS_COUNTER(cnt_free_coherent);
DECLARE_STATS_COUNTER(cross_page);
DECLARE_STATS_COUNTER(domain_flush_single);
DECLARE_STATS_COUNTER(domain_flush_all);
DECLARE_STATS_COUNTER(alloced_io_mem);

static struct dentry *stats_dir;
static struct dentry *de_isolate;
Expand Down Expand Up @@ -110,6 +111,7 @@ static void amd_iommu_stats_init(void)
amd_iommu_stats_add(&cross_page);
amd_iommu_stats_add(&domain_flush_single);
amd_iommu_stats_add(&domain_flush_all);
amd_iommu_stats_add(&alloced_io_mem);
}

#endif
Expand Down Expand Up @@ -1246,6 +1248,8 @@ static dma_addr_t __map_single(struct device *dev,
}
address += offset;

ADD_STATS_COUNTER(alloced_io_mem, size);

if (unlikely(dma_dom->need_flush && !amd_iommu_unmap_flush)) {
iommu_flush_tlb(iommu, dma_dom->domain.id);
dma_dom->need_flush = false;
Expand Down Expand Up @@ -1282,6 +1286,8 @@ static void __unmap_single(struct amd_iommu *iommu,
start += PAGE_SIZE;
}

SUB_STATS_COUNTER(alloced_io_mem, size);

dma_ops_free_addresses(dma_dom, dma_addr, pages);

if (amd_iommu_unmap_flush || dma_dom->need_flush) {
Expand Down

0 comments on commit 39ac243

Please sign in to comment.