linux-mips
[Top] [All Lists]

minor c-r4k.c cleanup

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: minor c-r4k.c cleanup
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 15 Apr 2003 00:24:25 +0900 (JST)
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
r4k_dma_cache_xxx should not flush icache ?

diff -u linux-mips/arch/mips/mm/c-r4k.c linux.new/arch/mips/mm
--- linux-mips/arch/mips/mm/c-r4k.c     Mon Apr 14 23:08:02 2003
+++ linux.new/arch/mips/mm/c-r4k.c      Tue Apr 15 00:12:27 2003
@@ -514,7 +514,7 @@
        unsigned long end, a;
 
        if (size >= dcache_size) {
-               r4k_flush_pcache_all();
+               r4k_blast_dcache();
        } else {
                unsigned long dc_lsize = current_cpu_data.dcache.linesz;
                R4600_HIT_CACHEOP_WAR_DECL;
@@ -539,7 +539,8 @@
        unsigned long end, a;
 
        if (size >= scache_size) {
-               r4k_flush_scache_all();
+               r4k_blast_dcache();
+               r4k_blast_scache();
                return;
        }
 
@@ -558,7 +559,7 @@
        unsigned long end, a;
 
        if (size >= dcache_size) {
-               r4k_flush_pcache_all();
+               r4k_blast_dcache();
        } else {
                unsigned long dc_lsize = current_cpu_data.dcache.linesz;
                R4600_HIT_CACHEOP_WAR_DECL;
@@ -583,7 +584,8 @@
        unsigned long end, a;
 
        if (size >= scache_size) {
-               r4k_flush_scache_all();
+               r4k_blast_dcache();
+               r4k_blast_scache();
                return;
        }
 
---

And I wonder why r4k_flush_pcache_mm (and r4k_flush_pcache_all) does
nothing if cpu_has_dc_aliases was not true.  I'm still
investigating...

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>