diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2009-12-15 19:48:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:18 -0500 |
commit | a66022c457755b5eef61e30866114679c95e1f54 (patch) | |
tree | acf5cbe134398b9541dfa0db267205e6c579cb6b /arch/sparc/kernel | |
parent | c1a2a962a2ad103846e7950b4591471fabecece7 (diff) |
iommu-helper: use bitmap library
Use bitmap library and kill some unused iommu helper functions.
1. s/iommu_area_free/bitmap_clear/
2. s/iommu_area_reserve/bitmap_set/
3. Use bitmap_find_next_zero_area instead of find_next_zero_area
This cannot be simple substitution because find_next_zero_area
doesn't check the last bit of the limit in bitmap
4. Remove iommu_area_free, iommu_area_reserve, and find_next_zero_area
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 7690cc219ecc..5fad94950e76 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-mapping.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/iommu-helper.h> | 13 | #include <linux/iommu-helper.h> |
14 | #include <linux/bitmap.h> | ||
14 | 15 | ||
15 | #ifdef CONFIG_PCI | 16 | #ifdef CONFIG_PCI |
16 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
@@ -169,7 +170,7 @@ void iommu_range_free(struct iommu *iommu, dma_addr_t dma_addr, unsigned long np | |||
169 | 170 | ||
170 | entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; | 171 | entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; |
171 | 172 | ||
172 | iommu_area_free(arena->map, entry, npages); | 173 | bitmap_clear(arena->map, entry, npages); |
173 | } | 174 | } |
174 | 175 | ||
175 | int iommu_table_init(struct iommu *iommu, int tsbsize, | 176 | int iommu_table_init(struct iommu *iommu, int tsbsize, |