]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Add noulri kernel argument to disable "rdhwr $29" usermode support.
authorChris Dearman <chris@mips.com>
Wed, 3 Oct 2007 09:43:56 +0000 (10:43 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 28 Apr 2008 16:14:26 +0000 (17:14 +0100)
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c

index 984c0d0a7b4d72d2f0ff49c6dcf450220ba061c4..d51f4e98455ff6bef4e9b6fd47d131b33a204b9b 100644 (file)
@@ -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);