Patch to make c-mips32.c compile when HW coherency is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch totally removes the dma_cache functions and the function pointers when the kernel is
compiled for HW coherency. Previously it didn't compile at all since the function pointers are non-
existant in this case.

The same problem exists in all the other c-*.c files in arch/mips/mm, so maybe there is something
which I don't understand?

/Hartvig


Index: c-mips32.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/c-mips32.c,v
retrieving revision 1.3.2.17
diff -u -r1.3.2.17 c-mips32.c
--- c-mips32.c	31 Mar 2003 23:29:06 -0000	1.3.2.17
+++ c-mips32.c	1 Apr 2003 12:17:14 -0000
@@ -293,6 +293,9 @@
 /*
  * Writeback and invalidate the primary cache dcache before DMA.
  */
+
+#ifdef	CONFIG_NONCOHERENT_IO
+
 static void
 mips32_dma_cache_wback_inv_pc(unsigned long addr, unsigned long size)
 {
@@ -379,9 +382,12 @@
 static void
 mips32_dma_cache_wback(unsigned long addr, unsigned long size)
 {
-	panic("mips32_dma_cache called - should not happen.");
+	panic("mips32_dma_cache_wback called - should not happen.");
 }
 
+#endif
+
+
 /*
  * While we're protected against bad userland addresses we don't care
  * very much about what happens in that case.  Usually a segmentation
@@ -596,9 +602,11 @@
 
 	_flush_icache_page = mips32_flush_icache_page;
 
+#ifdef	CONFIG_NONCOHERENT_IO
 	_dma_cache_wback_inv = mips32_dma_cache_wback_inv_pc;
 	_dma_cache_wback = mips32_dma_cache_wback;
 	_dma_cache_inv = mips32_dma_cache_inv_pc;
+#endif
 }
 
 static void __init setup_scache_funcs(void)
@@ -613,9 +621,11 @@
 
 	_flush_icache_page = mips32_flush_icache_page_s;
 
+#ifdef	CONFIG_NONCOHERENT_IO
 	_dma_cache_wback_inv = mips32_dma_cache_wback_inv_sc;
 	_dma_cache_wback = mips32_dma_cache_wback;
 	_dma_cache_inv = mips32_dma_cache_inv_sc;
+#endif
 }
 
 typedef int (*probe_func_t)(unsigned long);

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux