]> err.no Git - linux-2.6/commitdiff
[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel
authorChris Dearman <chris@mips.com>
Thu, 13 Dec 2007 22:42:19 +0000 (22:42 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 14 Dec 2007 17:34:30 +0000 (17:34 +0000)
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/process.c
arch/mips/kernel/traps.c

index 11cb264f59ce51b7e5e280524ead59e326c37c0a..2c09a442e5e5939160843570e60e829a5995fe32 100644 (file)
@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
        unsigned long status;
 
        /* New thread loses kernel privileges. */
-       status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK);
+       status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK);
 #ifdef CONFIG_64BIT
-       status &= ~ST0_FR;
        status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR;
 #endif
        status |= KU_USER;
index 23e73d0650a3bfd599a3c2dbab43dac23efa8004..fcae6675297273839812a4977c329ee6cb9e5899 100644 (file)
@@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void)
 #endif
        if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
                status_set |= ST0_XX;
+       if (cpu_has_dsp)
+               status_set |= ST0_MX;
+
        change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
                         status_set);
 
-       if (cpu_has_dsp)
-               set_c0_status(ST0_MX);
-
 #ifdef CONFIG_CPU_MIPSR2
        if (cpu_has_mips_r2) {
                unsigned int enable = 0x0000000f;