aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-09-11 04:50:29 -0400
committerRalf Baechle <ralf@linux-mips.org>2006-11-29 20:14:44 -0500
commit5b10496b6e6577f65b032a5c4c97d0d3a841273c (patch)
tree996de253070623043619f893afe8aa244ae88e8a /arch/mips/kernel/traps.c
parent656be92f9ae194ed62bc81310a4589a7cd765f13 (diff)
[MIPS] Fast path for rdhwr emulation for TLS
Add special short path for emulationg RDHWR which is used to support TLS. Add an extra prologue for cpu_has_vtag_icache case. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 9fda1b8be3a7..6eccfb49ae68 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -54,6 +54,8 @@ extern asmlinkage void handle_dbe(void);
54extern asmlinkage void handle_sys(void); 54extern asmlinkage void handle_sys(void);
55extern asmlinkage void handle_bp(void); 55extern asmlinkage void handle_bp(void);
56extern asmlinkage void handle_ri(void); 56extern asmlinkage void handle_ri(void);
57extern asmlinkage void handle_ri_rdhwr_vivt(void);
58extern asmlinkage void handle_ri_rdhwr(void);
57extern asmlinkage void handle_cpu(void); 59extern asmlinkage void handle_cpu(void);
58extern asmlinkage void handle_ov(void); 60extern asmlinkage void handle_ov(void);
59extern asmlinkage void handle_tr(void); 61extern asmlinkage void handle_tr(void);
@@ -1423,6 +1425,15 @@ void __init set_uncached_handler (unsigned long offset, void *addr, unsigned lon
1423 memcpy((void *)(uncached_ebase + offset), addr, size); 1425 memcpy((void *)(uncached_ebase + offset), addr, size);
1424} 1426}
1425 1427
1428static int __initdata rdhwr_noopt;
1429static int __init set_rdhwr_noopt(char *str)
1430{
1431 rdhwr_noopt = 1;
1432 return 1;
1433}
1434
1435__setup("rdhwr_noopt", set_rdhwr_noopt);
1436
1426void __init trap_init(void) 1437void __init trap_init(void)
1427{ 1438{
1428 extern char except_vec3_generic, except_vec3_r4000; 1439 extern char except_vec3_generic, except_vec3_r4000;
@@ -1502,7 +1513,9 @@ void __init trap_init(void)
1502 1513
1503 set_except_vector(8, handle_sys); 1514 set_except_vector(8, handle_sys);
1504 set_except_vector(9, handle_bp); 1515 set_except_vector(9, handle_bp);
1505 set_except_vector(10, handle_ri); 1516 set_except_vector(10, rdhwr_noopt ? handle_ri :
1517 (cpu_has_vtag_icache ?
1518 handle_ri_rdhwr_vivt : handle_ri_rdhwr));
1506 set_except_vector(11, handle_cpu); 1519 set_except_vector(11, handle_cpu);
1507 set_except_vector(12, handle_ov); 1520 set_except_vector(12, handle_ov);
1508 set_except_vector(13, handle_tr); 1521 set_except_vector(13, handle_tr);