aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-13 16:23:16 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-13 16:23:16 -0400
commit679bea5e438df70b5d4348fd2da4501aaeacebe0 (patch)
tree476c87af4c16b665d0f6bd8c3067f10b47507746
parentf613914efcc566245cd605bde6943fb5c2cd4ba3 (diff)
sparc: Kill mmu_{un,}lockarea().
These were used on sun4c during floppy data transfers since on that chip we had to lock the cpu mappings into the TLB because we cannot take a TLB miss during the assembler floppy interrupt handler that does the data transfer. That is no longer necessary since we've removed sun4c support, thus this stuff can disappear completely. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/include/asm/dma.h6
-rw-r--r--arch/sparc/include/asm/floppy_32.h6
-rw-r--r--arch/sparc/include/asm/floppy_64.h7
-rw-r--r--arch/sparc/include/asm/pgtable_64.h4
-rw-r--r--arch/sparc/kernel/sparc_ksyms_32.c2
-rw-r--r--arch/sparc/mm/io-unit.c14
-rw-r--r--arch/sparc/mm/iommu.c11
7 files changed, 3 insertions, 47 deletions
diff --git a/arch/sparc/include/asm/dma.h b/arch/sparc/include/asm/dma.h
index 67e017fc9866..1ef6f0b0a39f 100644
--- a/arch/sparc/include/asm/dma.h
+++ b/arch/sparc/include/asm/dma.h
@@ -92,12 +92,6 @@ extern int isa_dma_bridge_buggy;
92#ifdef CONFIG_SPARC32 92#ifdef CONFIG_SPARC32
93 93
94/* Routines for data transfer buffers. */ 94/* Routines for data transfer buffers. */
95BTFIXUPDEF_CALL(char *, mmu_lockarea, char *, unsigned long)
96BTFIXUPDEF_CALL(void, mmu_unlockarea, char *, unsigned long)
97
98#define mmu_lockarea(vaddr,len) BTFIXUP_CALL(mmu_lockarea)(vaddr,len)
99#define mmu_unlockarea(vaddr,len) BTFIXUP_CALL(mmu_unlockarea)(vaddr,len)
100
101struct page; 95struct page;
102struct device; 96struct device;
103struct scatterlist; 97struct scatterlist;
diff --git a/arch/sparc/include/asm/floppy_32.h b/arch/sparc/include/asm/floppy_32.h
index c514864cd2e2..fb3f16954c69 100644
--- a/arch/sparc/include/asm/floppy_32.h
+++ b/arch/sparc/include/asm/floppy_32.h
@@ -229,10 +229,7 @@ static inline void virtual_dma_init(void)
229static inline void sun_fd_disable_dma(void) 229static inline void sun_fd_disable_dma(void)
230{ 230{
231 doing_pdma = 0; 231 doing_pdma = 0;
232 if (pdma_base) { 232 pdma_base = NULL;
233 mmu_unlockarea(pdma_base, pdma_areasize);
234 pdma_base = NULL;
235 }
236} 233}
237 234
238static inline void sun_fd_set_dma_mode(int mode) 235static inline void sun_fd_set_dma_mode(int mode)
@@ -262,7 +259,6 @@ static inline void sun_fd_set_dma_count(int length)
262 259
263static inline void sun_fd_enable_dma(void) 260static inline void sun_fd_enable_dma(void)
264{ 261{
265 pdma_vaddr = mmu_lockarea(pdma_vaddr, pdma_size);
266 pdma_base = pdma_vaddr; 262 pdma_base = pdma_vaddr;
267 pdma_areasize = pdma_size; 263 pdma_areasize = pdma_size;
268} 264}
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index bcef1f5a2a6d..d534c276d706 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -161,10 +161,7 @@ unsigned long pdma_areasize;
161static void sun_fd_disable_dma(void) 161static void sun_fd_disable_dma(void)
162{ 162{
163 doing_pdma = 0; 163 doing_pdma = 0;
164 if (pdma_base) { 164 pdma_base = NULL;
165 mmu_unlockarea(pdma_base, pdma_areasize);
166 pdma_base = NULL;
167 }
168} 165}
169 166
170static void sun_fd_set_dma_mode(int mode) 167static void sun_fd_set_dma_mode(int mode)
@@ -194,7 +191,7 @@ static void sun_fd_set_dma_count(int length)
194 191
195static void sun_fd_enable_dma(void) 192static void sun_fd_enable_dma(void)
196{ 193{
197 pdma_vaddr = mmu_lockarea(pdma_vaddr, pdma_size); 194 pdma_vaddr = pdma_vaddr;
198 pdma_base = pdma_vaddr; 195 pdma_base = pdma_vaddr;
199 pdma_areasize = pdma_size; 196 pdma_areasize = pdma_size;
200} 197}
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index 76e4a52aa85e..61210db139fb 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -717,10 +717,6 @@ extern unsigned long find_ecache_flush_span(unsigned long size);
717struct seq_file; 717struct seq_file;
718extern void mmu_info(struct seq_file *); 718extern void mmu_info(struct seq_file *);
719 719
720/* These do nothing with the way I have things setup. */
721#define mmu_lockarea(vaddr, len) (vaddr)
722#define mmu_unlockarea(vaddr, len) do { } while(0)
723
724struct vm_area_struct; 720struct vm_area_struct;
725extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *); 721extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);
726 722
diff --git a/arch/sparc/kernel/sparc_ksyms_32.c b/arch/sparc/kernel/sparc_ksyms_32.c
index 9763895b22b2..5cc35baddedf 100644
--- a/arch/sparc/kernel/sparc_ksyms_32.c
+++ b/arch/sparc/kernel/sparc_ksyms_32.c
@@ -32,8 +32,6 @@ EXPORT_SYMBOL(empty_zero_page);
32#ifdef CONFIG_SMP 32#ifdef CONFIG_SMP
33EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); 33EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
34#endif 34#endif
35EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
36EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
37EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); 35EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
38EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one)); 36EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
39EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl)); 37EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
index fc58c3e917df..d175c0ae5e4d 100644
--- a/arch/sparc/mm/io-unit.c
+++ b/arch/sparc/mm/io-unit.c
@@ -242,22 +242,8 @@ static void iounit_unmap_dma_area(struct device *dev, unsigned long addr, int le
242} 242}
243#endif 243#endif
244 244
245static char *iounit_lockarea(char *vaddr, unsigned long len)
246{
247/* FIXME: Write this */
248 return vaddr;
249}
250
251static void iounit_unlockarea(char *vaddr, unsigned long len)
252{
253/* FIXME: Write this */
254}
255
256void __init ld_mmu_iounit(void) 245void __init ld_mmu_iounit(void)
257{ 246{
258 BTFIXUPSET_CALL(mmu_lockarea, iounit_lockarea, BTFIXUPCALL_RETO0);
259 BTFIXUPSET_CALL(mmu_unlockarea, iounit_unlockarea, BTFIXUPCALL_NOP);
260
261 BTFIXUPSET_CALL(mmu_get_scsi_one, iounit_get_scsi_one, BTFIXUPCALL_NORM); 247 BTFIXUPSET_CALL(mmu_get_scsi_one, iounit_get_scsi_one, BTFIXUPCALL_NORM);
262 BTFIXUPSET_CALL(mmu_get_scsi_sgl, iounit_get_scsi_sgl, BTFIXUPCALL_NORM); 248 BTFIXUPSET_CALL(mmu_get_scsi_sgl, iounit_get_scsi_sgl, BTFIXUPCALL_NORM);
263 BTFIXUPSET_CALL(mmu_release_scsi_one, iounit_release_scsi_one, BTFIXUPCALL_NORM); 249 BTFIXUPSET_CALL(mmu_release_scsi_one, iounit_release_scsi_one, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 07fc6a65d9b6..349ba83f1789 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -426,20 +426,9 @@ static void iommu_unmap_dma_area(struct device *dev, unsigned long busa, int len
426} 426}
427#endif 427#endif
428 428
429static char *iommu_lockarea(char *vaddr, unsigned long len)
430{
431 return vaddr;
432}
433
434static void iommu_unlockarea(char *vaddr, unsigned long len)
435{
436}
437
438void __init ld_mmu_iommu(void) 429void __init ld_mmu_iommu(void)
439{ 430{
440 viking_flush = (BTFIXUPVAL_CALL(flush_page_for_dma) == (unsigned long)viking_flush_page); 431 viking_flush = (BTFIXUPVAL_CALL(flush_page_for_dma) == (unsigned long)viking_flush_page);
441 BTFIXUPSET_CALL(mmu_lockarea, iommu_lockarea, BTFIXUPCALL_RETO0);
442 BTFIXUPSET_CALL(mmu_unlockarea, iommu_unlockarea, BTFIXUPCALL_NOP);
443 432
444 if (!BTFIXUPVAL_CALL(flush_page_for_dma)) { 433 if (!BTFIXUPVAL_CALL(flush_page_for_dma)) {
445 /* IO coherent chip */ 434 /* IO coherent chip */