Commit bbaf238b authored by Chris Dearman's avatar Chris Dearman Committed by Ralf Baechle

[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel

Signed-off-by: default avatarChris Dearman <chris@mips.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 4037500e
...@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) ...@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
unsigned long status; unsigned long status;
/* New thread loses kernel privileges. */ /* 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 #ifdef CONFIG_64BIT
status &= ~ST0_FR;
status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR; status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR;
#endif #endif
status |= KU_USER; status |= KU_USER;
......
...@@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void) ...@@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void)
#endif #endif
if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
status_set |= ST0_XX; 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, change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
status_set); status_set);
if (cpu_has_dsp)
set_c0_status(ST0_MX);
#ifdef CONFIG_CPU_MIPSR2 #ifdef CONFIG_CPU_MIPSR2
if (cpu_has_mips_r2) { if (cpu_has_mips_r2) {
unsigned int enable = 0x0000000f; unsigned int enable = 0x0000000f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment