diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index ce7684335a41..22fc19bbe87f 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -55,7 +55,7 @@ void __noreturn cpu_idle(void) | |||
55 | while (1) { | 55 | while (1) { |
56 | tick_nohz_stop_sched_tick(1); | 56 | tick_nohz_stop_sched_tick(1); |
57 | while (!need_resched()) { | 57 | while (!need_resched()) { |
58 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG | 58 | #ifdef CONFIG_MIPS_MT_SMTC |
59 | extern void smtc_idle_loop_hook(void); | 59 | extern void smtc_idle_loop_hook(void); |
60 | 60 | ||
61 | smtc_idle_loop_hook(); | 61 | smtc_idle_loop_hook(); |
@@ -145,19 +145,18 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
145 | */ | 145 | */ |
146 | p->thread.cp0_status = read_c0_status() & ~(ST0_CU2|ST0_CU1); | 146 | p->thread.cp0_status = read_c0_status() & ~(ST0_CU2|ST0_CU1); |
147 | childregs->cp0_status &= ~(ST0_CU2|ST0_CU1); | 147 | childregs->cp0_status &= ~(ST0_CU2|ST0_CU1); |
148 | |||
149 | #ifdef CONFIG_MIPS_MT_SMTC | ||
150 | /* | ||
151 | * SMTC restores TCStatus after Status, and the CU bits | ||
152 | * are aliased there. | ||
153 | */ | ||
154 | childregs->cp0_tcstatus &= ~(ST0_CU2|ST0_CU1); | ||
155 | #endif | ||
148 | clear_tsk_thread_flag(p, TIF_USEDFPU); | 156 | clear_tsk_thread_flag(p, TIF_USEDFPU); |
149 | 157 | ||
150 | #ifdef CONFIG_MIPS_MT_FPAFF | 158 | #ifdef CONFIG_MIPS_MT_FPAFF |
151 | clear_tsk_thread_flag(p, TIF_FPUBOUND); | 159 | clear_tsk_thread_flag(p, TIF_FPUBOUND); |
152 | |||
153 | /* | ||
154 | * FPU affinity support is cleaner if we track the | ||
155 | * user-visible CPU affinity from the very beginning. | ||
156 | * The generic cpus_allowed mask will already have | ||
157 | * been copied from the parent before copy_thread | ||
158 | * is invoked. | ||
159 | */ | ||
160 | p->thread.user_cpus_allowed = p->cpus_allowed; | ||
161 | #endif /* CONFIG_MIPS_MT_FPAFF */ | 160 | #endif /* CONFIG_MIPS_MT_FPAFF */ |
162 | 161 | ||
163 | if (clone_flags & CLONE_SETTLS) | 162 | if (clone_flags & CLONE_SETTLS) |