summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorChris Dearman <chris@mips.com>2007-10-03 11:43:56 +0200
committerRalf Baechle <ralf@linux-mips.org>2008-04-28 18:14:26 +0200
commitbdc94eb41e6090961695747508ac7e33ea5d6c08 (patch)
tree37351b46cc1bfaa6c6faedabb2b8f3a7c5671152 /arch/mips/kernel
parent[MIPS] Allow setting of the cache attribute at run time. (diff)
downloadlinux-bdc94eb41e6090961695747508ac7e33ea5d6c08.tar.xz
linux-bdc94eb41e6090961695747508ac7e33ea5d6c08.zip
[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/mips/kernel')
-rw-r--r--arch/mips/kernel/traps.c13
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;
int cp0_perfcount_irq;
EXPORT_SYMBOL_GPL(cp0_perfcount_irq);
+static int __cpuinitdata noulri;
+
+static int __init ulri_disable(char *s)
+{
+ pr_info("Disabling ulri\n");
+ noulri = 1;
+
+ return 1;
+}
+__setup("noulri", ulri_disable);
+
void __cpuinit per_cpu_trap_init(void)
{
unsigned int cpu = smp_processor_id();
@@ -1346,7 +1357,7 @@ void __cpuinit per_cpu_trap_init(void)
if (cpu_has_mips_r2) {
unsigned int enable = 0x0000000f;
- if (cpu_has_userlocal)
+ if (!noulri && cpu_has_userlocal)
enable |= (1 << 29);
write_c0_hwrena(enable);