Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Hartvig Ekner <hartvig@ekner.info>
To: Linux MIPS mailing list <linux-mips@linux-mips.org>
Subject: Patch to make c-mips32.c compile when HW coherency is used
Date: Tue, 01 Apr 2003 14:37:20 +0200	[thread overview]
Message-ID: <3E898800.450410D3@ekner.info> (raw)

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

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



[-- Attachment #2: noncoh_patch --]
[-- Type: text/plain, Size: 1505 bytes --]

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);

             reply	other threads:[~2003-04-01 12:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01 12:37 Hartvig Ekner [this message]
2003-04-01 17:27 ` Patch to make c-mips32.c compile when HW coherency is used Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E898800.450410D3@ekner.info \
    --to=hartvig@ekner.info \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox