linux-mips
[Top] [All Lists]

[patch] blast_scache nop for sc cpus without scache

To: linux-mips@linux-mips.org
Subject: [patch] blast_scache nop for sc cpus without scache
From: Florian Lohoff <flo@rfc822.org>
Date: Sat, 25 Jun 2005 15:19:38 +0200
Organization: rfc822 - pure communication
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.9i
Index: arch/mips/mm/c-r4k.c
===================================================================
RCS file: /scratch/local/linux-mips-cvs/linux/arch/mips/mm/c-r4k.c,v
retrieving revision 1.108
diff -u -p -r1.108 c-r4k.c
--- arch/mips/mm/c-r4k.c        25 Apr 2005 16:36:23 -0000      1.108
+++ arch/mips/mm/c-r4k.c        25 Jun 2005 13:15:55 -0000
@@ -225,6 +225,8 @@ static inline void r4k_blast_icache_setu
 
 static void (* r4k_blast_scache_page)(unsigned long addr);
 
+static void blast_scache_page_nop(unsigned long page) {}
+
 static inline void r4k_blast_scache_page_setup(void)
 {
        unsigned long sc_lsize = cpu_scache_line_size();
@@ -237,10 +239,14 @@ static inline void r4k_blast_scache_page
                r4k_blast_scache_page = blast_scache64_page;
        else if (sc_lsize == 128)
                r4k_blast_scache_page = blast_scache128_page;
+       else
+               r4k_blast_scache_page = blast_scache_page_nop;
 }
 
 static void (* r4k_blast_scache_page_indexed)(unsigned long addr);
 
+static void blast_scache_page_indexed_nop(unsigned long page) {}
+
 static inline void r4k_blast_scache_page_indexed_setup(void)
 {
        unsigned long sc_lsize = cpu_scache_line_size();
@@ -253,10 +259,14 @@ static inline void r4k_blast_scache_page
                r4k_blast_scache_page_indexed = blast_scache64_page_indexed;
        else if (sc_lsize == 128)
                r4k_blast_scache_page_indexed = blast_scache128_page_indexed;
+       else 
+               r4k_blast_scache_page_indexed = blast_scache_page_indexed_nop;
 }
 
 static void (* r4k_blast_scache)(void);
 
+static void blast_scache_nop(void ) {}
+
 static inline void r4k_blast_scache_setup(void)
 {
        unsigned long sc_lsize = cpu_scache_line_size();
@@ -269,6 +279,8 @@ static inline void r4k_blast_scache_setu
                r4k_blast_scache = blast_scache64;
        else if (sc_lsize == 128)
                r4k_blast_scache = blast_scache128;
+       else 
+               r4k_blast_scache = blast_scache_nop;
 }
 
 /*

-- 
Florian Lohoff                  flo@rfc822.org             +49-171-2280134
                        Heisenberg may have been here.

Attachment: signature.asc
Description: Digital signature

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