aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-11 14:41:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-11 14:41:00 -0400
commit22353f35c895acb7a8ca27ebdc6397c993b4213e (patch)
treeb1b52ca357ac2e5bb1428dea948bd4d175e40e07 /arch/mips/kernel/traps.c
parent3e2ce4dae98f6b246eaeb12833914d22fd83e31d (diff)
parentff72b7a6188088976bf7d77d3309a9b2f1716071 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix smp barriers in test_and_{change,clear,set}_bit [MIPS] Fix IP27 build [MIPS] Fix modpost warnings by making start_secondary __cpuinit [MIPS] SMTC: Fix build error caused by nonsense code. [MIPS] SMTC: The MT ASE requires to initialize c0_pagemask and c0_wired. [MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments. [MIPS] SMTC: Fix warning. [MIPS] Wire up utimensat, signalfd, timerfd, eventfd [MIPS] Atlas: Fix build. [MIPS] Always install the DSP exception handler. [MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi. [MIPS] Fix KMODE for the R3000
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. */