diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-04-25 02:51:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 04:55:42 -0400 |
commit | 9b3627f389c07c5be9c86ac4d472a0d4fd47feac (patch) | |
tree | 4e00925c81102399ec57e4eefe647dc23710a66d /arch/sparc64/kernel/sbus.c | |
parent | 711b360d64418e88ed45f812e0ebd202073d888d (diff) |
[SPARC64]: Consolidate {sbus,pci}_iommu_arena.
Move to asm-sparc64/iommu.h and rename to plain "iommu_arena".
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/sbus.c')
-rw-r--r-- | arch/sparc64/kernel/sbus.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c index d403f3df2dc2..279758d56b29 100644 --- a/arch/sparc64/kernel/sbus.c +++ b/arch/sparc64/kernel/sbus.c | |||
@@ -26,16 +26,10 @@ | |||
26 | 26 | ||
27 | #define MAP_BASE ((u32)0xc0000000) | 27 | #define MAP_BASE ((u32)0xc0000000) |
28 | 28 | ||
29 | struct sbus_iommu_arena { | ||
30 | unsigned long *map; | ||
31 | unsigned int hint; | ||
32 | unsigned int limit; | ||
33 | }; | ||
34 | |||
35 | struct sbus_iommu { | 29 | struct sbus_iommu { |
36 | spinlock_t lock; | 30 | spinlock_t lock; |
37 | 31 | ||
38 | struct sbus_iommu_arena arena; | 32 | struct iommu_arena arena; |
39 | 33 | ||
40 | iopte_t *page_table; | 34 | iopte_t *page_table; |
41 | unsigned long strbuf_regs; | 35 | unsigned long strbuf_regs; |
@@ -123,7 +117,7 @@ static void sbus_strbuf_flush(struct sbus_iommu *iommu, u32 base, unsigned long | |||
123 | /* Based largely upon the ppc64 iommu allocator. */ | 117 | /* Based largely upon the ppc64 iommu allocator. */ |
124 | static long sbus_arena_alloc(struct sbus_iommu *iommu, unsigned long npages) | 118 | static long sbus_arena_alloc(struct sbus_iommu *iommu, unsigned long npages) |
125 | { | 119 | { |
126 | struct sbus_iommu_arena *arena = &iommu->arena; | 120 | struct iommu_arena *arena = &iommu->arena; |
127 | unsigned long n, i, start, end, limit; | 121 | unsigned long n, i, start, end, limit; |
128 | int pass; | 122 | int pass; |
129 | 123 | ||
@@ -162,7 +156,7 @@ again: | |||
162 | return n; | 156 | return n; |
163 | } | 157 | } |
164 | 158 | ||
165 | static void sbus_arena_free(struct sbus_iommu_arena *arena, unsigned long base, unsigned long npages) | 159 | static void sbus_arena_free(struct iommu_arena *arena, unsigned long base, unsigned long npages) |
166 | { | 160 | { |
167 | unsigned long i; | 161 | unsigned long i; |
168 | 162 | ||