diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
| -rw-r--r-- | arch/mips/kernel/process.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index c66db5e5ab62..199a06e873c6 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
| @@ -41,6 +41,10 @@ | |||
| 41 | #include <asm/elf.h> | 41 | #include <asm/elf.h> |
| 42 | #include <asm/isadep.h> | 42 | #include <asm/isadep.h> |
| 43 | #include <asm/inst.h> | 43 | #include <asm/inst.h> |
| 44 | #ifdef CONFIG_MIPS_MT_SMTC | ||
| 45 | #include <asm/mipsmtregs.h> | ||
| 46 | extern void smtc_idle_loop_hook(void); | ||
| 47 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
| 44 | 48 | ||
| 45 | /* | 49 | /* |
| 46 | * The idle thread. There's no useful work to be done, so just try to conserve | 50 | * The idle thread. There's no useful work to be done, so just try to conserve |
| @@ -51,9 +55,13 @@ ATTRIB_NORET void cpu_idle(void) | |||
| 51 | { | 55 | { |
| 52 | /* endless idle loop with no priority at all */ | 56 | /* endless idle loop with no priority at all */ |
| 53 | while (1) { | 57 | while (1) { |
| 54 | while (!need_resched()) | 58 | while (!need_resched()) { |
| 59 | #ifdef CONFIG_MIPS_MT_SMTC | ||
| 60 | smtc_idle_loop_hook(); | ||
| 61 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
| 55 | if (cpu_wait) | 62 | if (cpu_wait) |
| 56 | (*cpu_wait)(); | 63 | (*cpu_wait)(); |
| 64 | } | ||
| 57 | preempt_enable_no_resched(); | 65 | preempt_enable_no_resched(); |
| 58 | schedule(); | 66 | schedule(); |
| 59 | preempt_disable(); | 67 | preempt_disable(); |
| @@ -177,6 +185,17 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
| 177 | childregs->cp0_status &= ~(ST0_CU2|ST0_CU1); | 185 | childregs->cp0_status &= ~(ST0_CU2|ST0_CU1); |
| 178 | clear_tsk_thread_flag(p, TIF_USEDFPU); | 186 | clear_tsk_thread_flag(p, TIF_USEDFPU); |
| 179 | 187 | ||
| 188 | #ifdef CONFIG_MIPS_MT_FPAFF | ||
| 189 | /* | ||
| 190 | * FPU affinity support is cleaner if we track the | ||
| 191 | * user-visible CPU affinity from the very beginning. | ||
| 192 | * The generic cpus_allowed mask will already have | ||
| 193 | * been copied from the parent before copy_thread | ||
| 194 | * is invoked. | ||
| 195 | */ | ||
| 196 | p->thread.user_cpus_allowed = p->cpus_allowed; | ||
| 197 | #endif /* CONFIG_MIPS_MT_FPAFF */ | ||
| 198 | |||
| 180 | if (clone_flags & CLONE_SETTLS) | 199 | if (clone_flags & CLONE_SETTLS) |
| 181 | ti->tp_value = regs->regs[7]; | 200 | ti->tp_value = regs->regs[7]; |
| 182 | 201 | ||
