linux-mips
[Top] [All Lists]

[PATCH 1/2] MIPS: RM7000: Make use of cache_op() instead of inline asm

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 1/2] MIPS: RM7000: Make use of cache_op() instead of inline asm
From: Ricardo Mendoza <ricmm@gentoo.org>
Date: Mon, 19 Jul 2010 04:59:59 +0100
Cc: Ricardo Mendoza <ricmm@gentoo.org>
In-reply-to: <1279512000-9154-1-git-send-email-ricmm@gentoo.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1279512000-9154-1-git-send-email-ricmm@gentoo.org>
Sender: linux-mips-bounce@linux-mips.org
Small cleanup of the cache code to get rid of inline asm, in preparation
to give tertiary cache support.

Signed-off-by: Ricardo Mendoza <ricmm@gentoo.org>
---
 arch/mips/mm/sc-rm7k.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c
index de69bfb..85678c4 100644
--- a/arch/mips/mm/sc-rm7k.c
+++ b/arch/mips/mm/sc-rm7k.c
@@ -95,16 +95,8 @@ static __cpuinit void __rm7k_sc_enable(void)
        write_c0_taglo(0);
        write_c0_taghi(0);
 
-       for (i = 0; i < scache_size; i += sc_lsize) {
-               __asm__ __volatile__ (
-                     ".set noreorder\n\t"
-                     ".set mips3\n\t"
-                     "cache %1, (%0)\n\t"
-                     ".set mips0\n\t"
-                     ".set reorder"
-                     :
-                     : "r" (CKSEG0ADDR(i)), "i" (Index_Store_Tag_SD));
-       }
+       for (i = 0; i < scache_size; i += sc_lsize)
+               cache_op(Index_Store_Tag_SD, CKSEG0ADDR(i));
 }
 
 static __cpuinit void rm7k_sc_enable(void)
-- 
1.6.4.4


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