diff options
| -rw-r--r-- | arch/mips/kernel/mips-mt-fpaff.c | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/process.c | 19 | ||||
| -rw-r--r-- | arch/mips/kernel/traps.c | 6 |
3 files changed, 14 insertions, 13 deletions
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index df4d3f2f740c..dc9eb72ed9de 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
| @@ -159,7 +159,7 @@ __setup("fpaff=", fpaff_thresh); | |||
| 159 | /* | 159 | /* |
| 160 | * FPU Use Factor empirically derived from experiments on 34K | 160 | * FPU Use Factor empirically derived from experiments on 34K |
| 161 | */ | 161 | */ |
| 162 | #define FPUSEFACTOR 333 | 162 | #define FPUSEFACTOR 2000 |
| 163 | 163 | ||
| 164 | static __init int mt_fp_affinity_init(void) | 164 | static __init int mt_fp_affinity_init(void) |
| 165 | { | 165 | { |
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) |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 5fd0cd020af5..b602ac6eb47d 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -825,8 +825,10 @@ static void mt_ase_fp_affinity(void) | |||
| 825 | if (cpus_intersects(current->cpus_allowed, mt_fpu_cpumask)) { | 825 | if (cpus_intersects(current->cpus_allowed, mt_fpu_cpumask)) { |
| 826 | cpumask_t tmask; | 826 | cpumask_t tmask; |
| 827 | 827 | ||
| 828 | cpus_and(tmask, current->thread.user_cpus_allowed, | 828 | current->thread.user_cpus_allowed |
| 829 | mt_fpu_cpumask); | 829 | = current->cpus_allowed; |
| 830 | cpus_and(tmask, current->cpus_allowed, | ||
| 831 | mt_fpu_cpumask); | ||
| 830 | set_cpus_allowed(current, tmask); | 832 | set_cpus_allowed(current, tmask); |
| 831 | set_thread_flag(TIF_FPUBOUND); | 833 | set_thread_flag(TIF_FPUBOUND); |
| 832 | } | 834 | } |
