diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2014-01-14 20:56:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-15 02:19:42 -0500 |
commit | 43a06847b9d277e9f2c3bf8052b44b74e17526c7 (patch) | |
tree | 0a6b948cd56efe2dcbfe17d90f016986f8bca99b /arch/mips/mm | |
parent | bad009fe354a00e6b2bf87328995ec76e59ab970 (diff) |
MIPS: fix blast_icache32 on loongson2
Commit 14bd8c082016 ("MIPS: Loongson: Get rid of Loongson 2 #ifdefery
all over arch/mips") failed to add Loongson2 specific blast_icache32
functions. Fix that.
The patch fixes the following crash seen with 3.13-rc1:
Reserved instruction in kernel code[#1]:
[...]
Call Trace:
blast_icache32_page+0x8/0xb0
r4k_flush_cache_page+0x19c/0x200
do_wp_page.isra.97+0x47c/0xe08
handle_mm_fault+0x938/0x1118
__do_page_fault+0x140/0x540
resume_userspace_check+0x0/0x10
Code: 00200825 64834000 00200825 <bc900000> bc900020 bc900040 bc900060 bc900080 bc9000a0
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 73f02da61baf..49e572d879e1 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -237,6 +237,8 @@ static void r4k_blast_icache_page_setup(void) | |||
237 | r4k_blast_icache_page = (void *)cache_noop; | 237 | r4k_blast_icache_page = (void *)cache_noop; |
238 | else if (ic_lsize == 16) | 238 | else if (ic_lsize == 16) |
239 | r4k_blast_icache_page = blast_icache16_page; | 239 | r4k_blast_icache_page = blast_icache16_page; |
240 | else if (ic_lsize == 32 && current_cpu_type() == CPU_LOONGSON2) | ||
241 | r4k_blast_icache_page = loongson2_blast_icache32_page; | ||
240 | else if (ic_lsize == 32) | 242 | else if (ic_lsize == 32) |
241 | r4k_blast_icache_page = blast_icache32_page; | 243 | r4k_blast_icache_page = blast_icache32_page; |
242 | else if (ic_lsize == 64) | 244 | else if (ic_lsize == 64) |
@@ -261,6 +263,9 @@ static void r4k_blast_icache_page_indexed_setup(void) | |||
261 | else if (TX49XX_ICACHE_INDEX_INV_WAR) | 263 | else if (TX49XX_ICACHE_INDEX_INV_WAR) |
262 | r4k_blast_icache_page_indexed = | 264 | r4k_blast_icache_page_indexed = |
263 | tx49_blast_icache32_page_indexed; | 265 | tx49_blast_icache32_page_indexed; |
266 | else if (current_cpu_type() == CPU_LOONGSON2) | ||
267 | r4k_blast_icache_page_indexed = | ||
268 | loongson2_blast_icache32_page_indexed; | ||
264 | else | 269 | else |
265 | r4k_blast_icache_page_indexed = | 270 | r4k_blast_icache_page_indexed = |
266 | blast_icache32_page_indexed; | 271 | blast_icache32_page_indexed; |
@@ -284,6 +289,8 @@ static void r4k_blast_icache_setup(void) | |||
284 | r4k_blast_icache = blast_r4600_v1_icache32; | 289 | r4k_blast_icache = blast_r4600_v1_icache32; |
285 | else if (TX49XX_ICACHE_INDEX_INV_WAR) | 290 | else if (TX49XX_ICACHE_INDEX_INV_WAR) |
286 | r4k_blast_icache = tx49_blast_icache32; | 291 | r4k_blast_icache = tx49_blast_icache32; |
292 | else if (current_cpu_type() == CPU_LOONGSON2) | ||
293 | r4k_blast_icache = loongson2_blast_icache32; | ||
287 | else | 294 | else |
288 | r4k_blast_icache = blast_icache32; | 295 | r4k_blast_icache = blast_icache32; |
289 | } else if (ic_lsize == 64) | 296 | } else if (ic_lsize == 64) |