aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/iommu.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2009-12-15 19:48:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:18 -0500
commita66022c457755b5eef61e30866114679c95e1f54 (patch)
treeacf5cbe134398b9541dfa0db267205e6c579cb6b /arch/powerpc/kernel/iommu.c
parentc1a2a962a2ad103846e7950b4591471fabecece7 (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/powerpc/kernel/iommu.c')
-rw-r--r--arch/powerpc/kernel/iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index fd51578e29dd..5547ae6e6b0b 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -30,7 +30,7 @@
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/dma-mapping.h> 32#include <linux/dma-mapping.h>
33#include <linux/bitops.h> 33#include <linux/bitmap.h>
34#include <linux/iommu-helper.h> 34#include <linux/iommu-helper.h>
35#include <linux/crash_dump.h> 35#include <linux/crash_dump.h>
36#include <asm/io.h> 36#include <asm/io.h>
@@ -251,7 +251,7 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
251 } 251 }
252 252
253 ppc_md.tce_free(tbl, entry, npages); 253 ppc_md.tce_free(tbl, entry, npages);
254 iommu_area_free(tbl->it_map, free_entry, npages); 254 bitmap_clear(tbl->it_map, free_entry, npages);
255} 255}
256 256
257static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, 257static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,