linux-mips
[Top] [All Lists]

[PATCH] tx49_blast_icache32_page_indexed fix

To: linux-mips@linux-mips.org
Subject: [PATCH] tx49_blast_icache32_page_indexed fix
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 04 Apr 2006 17:34:14 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Fix an index value in tx49_blast_icache32_page_indexed().
This is a damage by 13acfa3fdef15edaa4f5444c68e28e05978afa08 commit.

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

diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 32b7f6a..c4c2084 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -154,7 +154,8 @@ static inline void blast_icache32_r4600_
 
 static inline void tx49_blast_icache32_page_indexed(unsigned long page)
 {
-       unsigned long start = page;
+       unsigned long indexmask = current_cpu_data.icache.waysize - 1;
+       unsigned long start = INDEX_BASE + (page & indexmask);
        unsigned long end = start + PAGE_SIZE;
        unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit;
        unsigned long ws_end = current_cpu_data.icache.ways <<

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