diff options
Diffstat (limited to 'include/asm-mips/system.h')
-rw-r--r-- | include/asm-mips/system.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index bb0b289dbc9e..9b3a8dd2c3db 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -44,7 +44,7 @@ struct task_struct; | |||
44 | * different thread. | 44 | * different thread. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define switch_to(prev,next,last) \ | 47 | #define __mips_mt_fpaff_switch_to(prev) \ |
48 | do { \ | 48 | do { \ |
49 | if (cpu_has_fpu && \ | 49 | if (cpu_has_fpu && \ |
50 | (prev->thread.mflags & MF_FPUBOUND) && \ | 50 | (prev->thread.mflags & MF_FPUBOUND) && \ |
@@ -52,24 +52,22 @@ do { \ | |||
52 | prev->thread.mflags &= ~MF_FPUBOUND; \ | 52 | prev->thread.mflags &= ~MF_FPUBOUND; \ |
53 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ | 53 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ |
54 | } \ | 54 | } \ |
55 | if (cpu_has_dsp) \ | ||
56 | __save_dsp(prev); \ | ||
57 | next->thread.emulated_fp = 0; \ | 55 | next->thread.emulated_fp = 0; \ |
58 | (last) = resume(prev, next, task_thread_info(next)); \ | ||
59 | if (cpu_has_dsp) \ | ||
60 | __restore_dsp(current); \ | ||
61 | } while(0) | 56 | } while(0) |
62 | 57 | ||
63 | #else | 58 | #else |
59 | #define __mips_mt_fpaff_switch_to(prev) do { (prev); } while (0) | ||
60 | #endif | ||
61 | |||
64 | #define switch_to(prev,next,last) \ | 62 | #define switch_to(prev,next,last) \ |
65 | do { \ | 63 | do { \ |
64 | __mips_mt_fpaff_switch_to(prev); \ | ||
66 | if (cpu_has_dsp) \ | 65 | if (cpu_has_dsp) \ |
67 | __save_dsp(prev); \ | 66 | __save_dsp(prev); \ |
68 | (last) = resume(prev, next, task_thread_info(next)); \ | 67 | (last) = resume(prev, next, task_thread_info(next)); \ |
69 | if (cpu_has_dsp) \ | 68 | if (cpu_has_dsp) \ |
70 | __restore_dsp(current); \ | 69 | __restore_dsp(current); \ |
71 | } while(0) | 70 | } while(0) |
72 | #endif | ||
73 | 71 | ||
74 | /* | 72 | /* |
75 | * On SMP systems, when the scheduler does migration-cost autodetection, | 73 | * On SMP systems, when the scheduler does migration-cost autodetection, |