linux-mips
[Top] [All Lists]

[PATCH] mips/mm/c-r4k.c NONCOHERENT compile fix

To: linux-mips@oss.sgi.com
Subject: [PATCH] mips/mm/c-r4k.c NONCOHERENT compile fix
From: Florian Lohoff <flo@rfc822.org>
Date: Tue, 27 Nov 2001 02:04:00 +0100
Organization: rfc822 - pure communication
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.3.23i
Hi,
this is needed for the NONCOHERENT stuff ...



diff -u -r1.1 c-r4k.c
--- arch/mips/mm/c-r4k.c        2001/10/23 01:02:46     1.1
+++ arch/mips/mm/c-r4k.c        2001/11/27 02:02:19
@@ -1141,6 +1141,7 @@
        flush_cache_all();
 }
 
+#ifdef CONFIG_NONCOHERENT_IO
 /*
  * Writeback and invalidate the primary cache dcache before DMA.
  *
@@ -1247,6 +1248,8 @@
        panic("r4k_dma_cache called - should not happen.\n");
 }
 
+#endif /* CONFIG_NONCOHERENT_IO */
+
 /*
  * While we're protected against bad userland addresses we don't care
  * very much about what happens in that case.  Usually a segmentation
@@ -1436,9 +1439,14 @@
 
        _flush_icache_page = r4k_flush_icache_page_p;
 
+#ifdef CONFIG_NONCOHERENT_IO
+
        _dma_cache_wback_inv = r4k_dma_cache_wback_inv_pc;
        _dma_cache_wback = r4k_dma_cache_wback;
        _dma_cache_inv = r4k_dma_cache_inv_pc;
+
+#endif
+
 }
 
 static void __init setup_scache_funcs(void)
@@ -1519,9 +1527,15 @@
        }
        ___flush_cache_all = _flush_cache_all;
        _flush_icache_page = r4k_flush_icache_page_s;
+
+#ifdef CONFIG_NONCOHERENT_IO
+
        _dma_cache_wback_inv = r4k_dma_cache_wback_inv_sc;
        _dma_cache_wback = r4k_dma_cache_wback;
        _dma_cache_inv = r4k_dma_cache_inv_sc;
+
+#endif /* CONFIG_NONCOHERENT_IO */
+
 }
 
 typedef int (*probe_func_t)(unsigned long);



Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium

Attachment: pgpgJu5j2tmFe.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] mips/mm/c-r4k.c NONCOHERENT compile fix, Florian Lohoff <=