diff options
author | Chris Dearman <chris@mips.com> | 2007-10-03 05:43:56 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-04-28 12:14:26 -0400 |
commit | bdc94eb41e6090961695747508ac7e33ea5d6c08 (patch) | |
tree | 37351b46cc1bfaa6c6faedabb2b8f3a7c5671152 /arch | |
parent | 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 (diff) |
[MIPS] Add noulri kernel argument to disable "rdhwr $29" usermode support.
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/traps.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 984c0d0a7b4d..d51f4e98455f 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1306,6 +1306,17 @@ int cp0_compare_irq; | |||
1306 | int cp0_perfcount_irq; | 1306 | int cp0_perfcount_irq; |
1307 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); | 1307 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); |
1308 | 1308 | ||
1309 | static int __cpuinitdata noulri; | ||
1310 | |||
1311 | static int __init ulri_disable(char *s) | ||
1312 | { | ||
1313 | pr_info("Disabling ulri\n"); | ||
1314 | noulri = 1; | ||
1315 | |||
1316 | return 1; | ||
1317 | } | ||
1318 | __setup("noulri", ulri_disable); | ||
1319 | |||
1309 | void __cpuinit per_cpu_trap_init(void) | 1320 | void __cpuinit per_cpu_trap_init(void) |
1310 | { | 1321 | { |
1311 | unsigned int cpu = smp_processor_id(); | 1322 | unsigned int cpu = smp_processor_id(); |
@@ -1346,7 +1357,7 @@ void __cpuinit per_cpu_trap_init(void) | |||
1346 | if (cpu_has_mips_r2) { | 1357 | if (cpu_has_mips_r2) { |
1347 | unsigned int enable = 0x0000000f; | 1358 | unsigned int enable = 0x0000000f; |
1348 | 1359 | ||
1349 | if (cpu_has_userlocal) | 1360 | if (!noulri && cpu_has_userlocal) |
1350 | enable |= (1 << 29); | 1361 | enable |= (1 << 29); |
1351 | 1362 | ||
1352 | write_c0_hwrena(enable); | 1363 | write_c0_hwrena(enable); |