Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125637
b: refs/heads/master
c: c185897
h: refs/heads/master
i:
  125635: 0cb6b97
v: v3
  • Loading branch information
Joerg Roedel committed Jan 3, 2009
1 parent c800c27 commit 37e0165
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 5d31ee7e08b7713596b999a42e67491bdf3665b3
refs/heads/master: c1858976f5ef05122bb671f678beaf7e1fe1dd74
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ DECLARE_STATS_COUNTER(cnt_map_sg);
DECLARE_STATS_COUNTER(cnt_unmap_sg);
DECLARE_STATS_COUNTER(cnt_alloc_coherent);
DECLARE_STATS_COUNTER(cnt_free_coherent);
DECLARE_STATS_COUNTER(cross_page);

static struct dentry *stats_dir;
static struct dentry *de_isolate;
Expand Down Expand Up @@ -104,6 +105,7 @@ static void amd_iommu_stats_init(void)
amd_iommu_stats_add(&cnt_unmap_sg);
amd_iommu_stats_add(&cnt_alloc_coherent);
amd_iommu_stats_add(&cnt_free_coherent);
amd_iommu_stats_add(&cross_page);
}

#endif
Expand Down Expand Up @@ -1217,6 +1219,9 @@ static dma_addr_t __map_single(struct device *dev,
pages = iommu_num_pages(paddr, size, PAGE_SIZE);
paddr &= PAGE_MASK;

if (pages > 1)
INC_STATS_COUNTER(cross_page);

if (align)
align_mask = (1UL << get_order(size)) - 1;

Expand Down

0 comments on commit 37e0165

Please sign in to comment.