linux-mips
[Top] [All Lists]

[PATCH] Call flush_icache_range for handle_tlb[lsm]

To: linux-mips@linux-mips.org
Subject: [PATCH] Call flush_icache_range for handle_tlb[lsm]
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Fri, 21 Oct 2005 17:12:08 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Call flush_icache_range for handle_tlb[lsm].  These flushing were
removed by 452cafe60d0605e9af0c33bbef4f9443776461ea.  This patch add
them again in safe place.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1149,6 +1149,7 @@ static inline void signal32_init(void)
 
 extern void cpu_cache_init(void);
 extern void tlb_init(void);
+extern void flush_tlb_handlers(void);
 
 void __init per_cpu_trap_init(void)
 {
@@ -1356,4 +1357,5 @@ void __init trap_init(void)
 #endif
 
        flush_icache_range(ebase, ebase + 0x400);
+       flush_tlb_handlers();
 }
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1804,3 +1804,13 @@ void __init build_tlb_refill_handler(voi
                }
        }
 }
+
+void __init flush_tlb_handlers(void)
+{
+       flush_icache_range((unsigned long)handle_tlbl,
+                          (unsigned long)handle_tlbl + sizeof(handle_tlbl));
+       flush_icache_range((unsigned long)handle_tlbs,
+                          (unsigned long)handle_tlbs + sizeof(handle_tlbs));
+       flush_icache_range((unsigned long)handle_tlbm,
+                          (unsigned long)handle_tlbm + sizeof(handle_tlbm));
+}

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