aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 3f58b6ac1358..a7a17eb9bfcd 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -11,6 +11,7 @@
11 * Copyright (C) 2000, 01 MIPS Technologies, Inc. 11 * Copyright (C) 2000, 01 MIPS Technologies, Inc.
12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki 12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki
13 */ 13 */
14#include <linux/bug.h>
14#include <linux/init.h> 15#include <linux/init.h>
15#include <linux/mm.h> 16#include <linux/mm.h>
16#include <linux/module.h> 17#include <linux/module.h>
@@ -1190,8 +1191,8 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
1190 1191
1191 memcpy (b, &except_vec_vi, handler_len); 1192 memcpy (b, &except_vec_vi, handler_len);
1192#ifdef CONFIG_MIPS_MT_SMTC 1193#ifdef CONFIG_MIPS_MT_SMTC
1193 if (n > 7) 1194 BUG_ON(n > 7); /* Vector index %d exceeds SMTC maximum. */
1194 printk("Vector index %d exceeds SMTC maximum\n", n); 1195
1195 w = (u32 *)(b + mori_offset); 1196 w = (u32 *)(b + mori_offset);
1196 *w = (*w & 0xffff0000) | (0x100 << n); 1197 *w = (*w & 0xffff0000) | (0x100 << n);
1197#endif /* CONFIG_MIPS_MT_SMTC */ 1198#endif /* CONFIG_MIPS_MT_SMTC */
@@ -1383,6 +1384,13 @@ void __init per_cpu_trap_init(void)
1383 cpu_cache_init(); 1384 cpu_cache_init();
1384 tlb_init(); 1385 tlb_init();
1385#ifdef CONFIG_MIPS_MT_SMTC 1386#ifdef CONFIG_MIPS_MT_SMTC
1387 } else if (!secondaryTC) {
1388 /*
1389 * First TC in non-boot VPE must do subset of tlb_init()
1390 * for MMU countrol registers.
1391 */
1392 write_c0_pagemask(PM_DEFAULT_MASK);
1393 write_c0_wired(0);
1386 } 1394 }
1387#endif /* CONFIG_MIPS_MT_SMTC */ 1395#endif /* CONFIG_MIPS_MT_SMTC */
1388} 1396}
@@ -1531,8 +1539,7 @@ void __init trap_init(void)
1531 if (cpu_has_mipsmt) 1539 if (cpu_has_mipsmt)
1532 set_except_vector(25, handle_mt); 1540 set_except_vector(25, handle_mt);
1533 1541
1534 if (cpu_has_dsp) 1542 set_except_vector(26, handle_dsp);
1535 set_except_vector(26, handle_dsp);
1536 1543
1537 if (cpu_has_vce) 1544 if (cpu_has_vce)
1538 /* Special exception: R4[04]00 uses also the divec space. */ 1545 /* Special exception: R4[04]00 uses also the divec space. */