Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107191
b: refs/heads/master
c: 8978b74
h: refs/heads/master
i:
  107189: 1bcdfb8
  107187: 0cfc9b2
  107183: 5dbc172
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Jul 29, 2008
1 parent c1cd2cb commit f41da84
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 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: 35780c8ea7ad5c6d5483244d5f5bf37176fda86a
refs/heads/master: 8978b74253280d59e97cf49a3ec2c0cbccd5b801
8 changes: 8 additions & 0 deletions trunk/arch/x86/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ void __init pci_iommu_alloc(void)

pci_swiotlb_init();
}

unsigned long iommu_num_pages(unsigned long addr, unsigned long len)
{
unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE);

return size >> PAGE_SHIFT;
}
EXPORT_SYMBOL(iommu_num_pages);
#endif

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ extern struct dma_mapping_ops nommu_dma_ops;
extern int force_iommu, no_iommu;
extern int iommu_detected;

extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);

#ifdef CONFIG_GART_IOMMU
extern int gart_iommu_aperture;
extern int gart_iommu_aperture_allowed;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/iommu-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
unsigned long align_mask);
extern void iommu_area_free(unsigned long *map, unsigned long start,
unsigned int nr);
extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);
8 changes: 0 additions & 8 deletions trunk/lib/iommu-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,3 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr)
}
}
EXPORT_SYMBOL(iommu_area_free);

unsigned long iommu_num_pages(unsigned long addr, unsigned long len)
{
unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE);

return size >> PAGE_SHIFT;
}
EXPORT_SYMBOL(iommu_num_pages);

0 comments on commit f41da84

Please sign in to comment.