diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 05:29:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 05:15:03 -0400 |
commit | b1387c35bef6da55f6f2c27dfb748c86a4ef7ef9 (patch) | |
tree | 00d3a5e9b9a37c8b1ea757f1383ec1866316e162 /arch | |
parent | aba945e76b9caeae5b6cfff179ca7bebb9bac805 (diff) |
sparc32: Kill mmu_translate_dvma and implementations.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/include/asm/dma.h | 2 | ||||
-rw-r--r-- | arch/sparc/mm/io-unit.c | 14 | ||||
-rw-r--r-- | arch/sparc/mm/iommu.c | 10 | ||||
-rw-r--r-- | arch/sparc/mm/sun4c.c | 8 |
4 files changed, 0 insertions, 34 deletions
diff --git a/arch/sparc/include/asm/dma.h b/arch/sparc/include/asm/dma.h index 5955177ec752..ee4ac181bf2f 100644 --- a/arch/sparc/include/asm/dma.h +++ b/arch/sparc/include/asm/dma.h | |||
@@ -132,12 +132,10 @@ BTFIXUPDEF_CALL(void, mmu_release_scsi_sgl, struct device *, struct scatterlist | |||
132 | * to a separate mapping function for CPU visible mappings. | 132 | * to a separate mapping function for CPU visible mappings. |
133 | */ | 133 | */ |
134 | BTFIXUPDEF_CALL(int, mmu_map_dma_area, dma_addr_t *, unsigned long, unsigned long, int len) | 134 | BTFIXUPDEF_CALL(int, mmu_map_dma_area, dma_addr_t *, unsigned long, unsigned long, int len) |
135 | BTFIXUPDEF_CALL(struct page *, mmu_translate_dvma, unsigned long busa) | ||
136 | BTFIXUPDEF_CALL(void, mmu_unmap_dma_area, unsigned long busa, int len) | 135 | BTFIXUPDEF_CALL(void, mmu_unmap_dma_area, unsigned long busa, int len) |
137 | 136 | ||
138 | #define mmu_map_dma_area(pba,va,a,len) BTFIXUP_CALL(mmu_map_dma_area)(pba,va,a,len) | 137 | #define mmu_map_dma_area(pba,va,a,len) BTFIXUP_CALL(mmu_map_dma_area)(pba,va,a,len) |
139 | #define mmu_unmap_dma_area(ba,len) BTFIXUP_CALL(mmu_unmap_dma_area)(ba,len) | 138 | #define mmu_unmap_dma_area(ba,len) BTFIXUP_CALL(mmu_unmap_dma_area)(ba,len) |
140 | #define mmu_translate_dvma(ba) BTFIXUP_CALL(mmu_translate_dvma)(ba) | ||
141 | #endif | 139 | #endif |
142 | 140 | ||
143 | #endif /* !(_ASM_SPARC_DMA_H) */ | 141 | #endif /* !(_ASM_SPARC_DMA_H) */ |
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index 4239655a6aaf..6b469820fb92 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c | |||
@@ -233,19 +233,6 @@ static void iounit_unmap_dma_area(unsigned long addr, int len) | |||
233 | { | 233 | { |
234 | /* XXX Somebody please fill this in */ | 234 | /* XXX Somebody please fill this in */ |
235 | } | 235 | } |
236 | |||
237 | /* XXX We do not pass sbus device here, bad. */ | ||
238 | static struct page *iounit_translate_dvma(unsigned long addr) | ||
239 | { | ||
240 | struct sbus_bus *sbus = sbus_root; /* They are all the same */ | ||
241 | struct iounit_struct *iounit = sbus->ofdev.dev.archdata.iommu; | ||
242 | int i; | ||
243 | iopte_t *iopte; | ||
244 | |||
245 | i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT); | ||
246 | iopte = (iopte_t *)(iounit->page_table + i); | ||
247 | return pfn_to_page(iopte_val(*iopte) >> (PAGE_SHIFT-4)); /* XXX sun4d guru, help */ | ||
248 | } | ||
249 | #endif | 236 | #endif |
250 | 237 | ||
251 | static char *iounit_lockarea(char *vaddr, unsigned long len) | 238 | static char *iounit_lockarea(char *vaddr, unsigned long len) |
@@ -272,7 +259,6 @@ void __init ld_mmu_iounit(void) | |||
272 | #ifdef CONFIG_SBUS | 259 | #ifdef CONFIG_SBUS |
273 | BTFIXUPSET_CALL(mmu_map_dma_area, iounit_map_dma_area, BTFIXUPCALL_NORM); | 260 | BTFIXUPSET_CALL(mmu_map_dma_area, iounit_map_dma_area, BTFIXUPCALL_NORM); |
274 | BTFIXUPSET_CALL(mmu_unmap_dma_area, iounit_unmap_dma_area, BTFIXUPCALL_NORM); | 261 | BTFIXUPSET_CALL(mmu_unmap_dma_area, iounit_unmap_dma_area, BTFIXUPCALL_NORM); |
275 | BTFIXUPSET_CALL(mmu_translate_dvma, iounit_translate_dvma, BTFIXUPCALL_NORM); | ||
276 | #endif | 262 | #endif |
277 | } | 263 | } |
278 | 264 | ||
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 8e9ab930f097..832d99f33470 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c | |||
@@ -421,15 +421,6 @@ static void iommu_unmap_dma_area(unsigned long busa, int len) | |||
421 | iommu_invalidate(iommu->regs); | 421 | iommu_invalidate(iommu->regs); |
422 | bit_map_clear(&iommu->usemap, ioptex, len >> PAGE_SHIFT); | 422 | bit_map_clear(&iommu->usemap, ioptex, len >> PAGE_SHIFT); |
423 | } | 423 | } |
424 | |||
425 | static struct page *iommu_translate_dvma(unsigned long busa) | ||
426 | { | ||
427 | struct iommu_struct *iommu = sbus_root->ofdev.dev.archdata.iommu; | ||
428 | iopte_t *iopte = iommu->page_table; | ||
429 | |||
430 | iopte += ((busa - iommu->start) >> PAGE_SHIFT); | ||
431 | return pfn_to_page((iopte_val(*iopte) & IOPTE_PAGE) >> (PAGE_SHIFT-4)); | ||
432 | } | ||
433 | #endif | 424 | #endif |
434 | 425 | ||
435 | static char *iommu_lockarea(char *vaddr, unsigned long len) | 426 | static char *iommu_lockarea(char *vaddr, unsigned long len) |
@@ -465,7 +456,6 @@ void __init ld_mmu_iommu(void) | |||
465 | #ifdef CONFIG_SBUS | 456 | #ifdef CONFIG_SBUS |
466 | BTFIXUPSET_CALL(mmu_map_dma_area, iommu_map_dma_area, BTFIXUPCALL_NORM); | 457 | BTFIXUPSET_CALL(mmu_map_dma_area, iommu_map_dma_area, BTFIXUPCALL_NORM); |
467 | BTFIXUPSET_CALL(mmu_unmap_dma_area, iommu_unmap_dma_area, BTFIXUPCALL_NORM); | 458 | BTFIXUPSET_CALL(mmu_unmap_dma_area, iommu_unmap_dma_area, BTFIXUPCALL_NORM); |
468 | BTFIXUPSET_CALL(mmu_translate_dvma, iommu_translate_dvma, BTFIXUPCALL_NORM); | ||
469 | #endif | 459 | #endif |
470 | 460 | ||
471 | if (viking_mxcc_present || srmmu_modtype == HyperSparc) { | 461 | if (viking_mxcc_present || srmmu_modtype == HyperSparc) { |
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index d1782f6368be..65af3119f5ac 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -555,13 +555,6 @@ static int sun4c_map_dma_area(dma_addr_t *pba, unsigned long va, | |||
555 | return 0; | 555 | return 0; |
556 | } | 556 | } |
557 | 557 | ||
558 | static struct page *sun4c_translate_dvma(unsigned long busa) | ||
559 | { | ||
560 | /* Fortunately for us, bus_addr == uncached_virt in sun4c. */ | ||
561 | unsigned long pte = sun4c_get_pte(busa); | ||
562 | return pfn_to_page(pte & SUN4C_PFN_MASK); | ||
563 | } | ||
564 | |||
565 | static void sun4c_unmap_dma_area(unsigned long busa, int len) | 558 | static void sun4c_unmap_dma_area(unsigned long busa, int len) |
566 | { | 559 | { |
567 | /* Fortunately for us, bus_addr == uncached_virt in sun4c. */ | 560 | /* Fortunately for us, bus_addr == uncached_virt in sun4c. */ |
@@ -2263,7 +2256,6 @@ void __init ld_mmu_sun4c(void) | |||
2263 | 2256 | ||
2264 | BTFIXUPSET_CALL(mmu_map_dma_area, sun4c_map_dma_area, BTFIXUPCALL_NORM); | 2257 | BTFIXUPSET_CALL(mmu_map_dma_area, sun4c_map_dma_area, BTFIXUPCALL_NORM); |
2265 | BTFIXUPSET_CALL(mmu_unmap_dma_area, sun4c_unmap_dma_area, BTFIXUPCALL_NORM); | 2258 | BTFIXUPSET_CALL(mmu_unmap_dma_area, sun4c_unmap_dma_area, BTFIXUPCALL_NORM); |
2266 | BTFIXUPSET_CALL(mmu_translate_dvma, sun4c_translate_dvma, BTFIXUPCALL_NORM); | ||
2267 | 2259 | ||
2268 | BTFIXUPSET_CALL(sparc_mapiorange, sun4c_mapiorange, BTFIXUPCALL_NORM); | 2260 | BTFIXUPSET_CALL(sparc_mapiorange, sun4c_mapiorange, BTFIXUPCALL_NORM); |
2269 | BTFIXUPSET_CALL(sparc_unmapiorange, sun4c_unmapiorange, BTFIXUPCALL_NORM); | 2261 | BTFIXUPSET_CALL(sparc_unmapiorange, sun4c_unmapiorange, BTFIXUPCALL_NORM); |