.. | .. |
---|
8 | 8 | #include <asm/asm-offsets.h> |
---|
9 | 9 | #include <asm/thread_info.h> |
---|
10 | 10 | #include <asm/current.h> |
---|
| 11 | +#include <asm/fpu.h> |
---|
11 | 12 | |
---|
12 | 13 | |
---|
13 | 14 | |
---|
.. | .. |
---|
22 | 23 | .macro restore_user_regs_first |
---|
23 | 24 | setgie.d |
---|
24 | 25 | isb |
---|
25 | | - |
---|
| 26 | +#if defined(CONFIG_FPU) |
---|
| 27 | + addi $sp, $sp, OSP_OFFSET |
---|
| 28 | + lmw.adm $r12, [$sp], $r25, #0x0 |
---|
| 29 | + sethi $p0, hi20(has_fpu) |
---|
| 30 | + lbsi $p0, [$p0+lo12(has_fpu)] |
---|
| 31 | + beqz $p0, 2f |
---|
| 32 | + mtsr $r25, $FUCOP_CTL |
---|
| 33 | +2: |
---|
| 34 | +#else |
---|
26 | 35 | addi $sp, $sp, FUCOP_CTL_OFFSET |
---|
27 | | - |
---|
28 | 36 | lmw.adm $r12, [$sp], $r24, #0x0 |
---|
| 37 | +#endif |
---|
29 | 38 | mtsr $r12, $SP_USR |
---|
30 | 39 | mtsr $r13, $IPC |
---|
31 | 40 | #ifdef CONFIG_HWZOL |
---|
.. | .. |
---|
63 | 72 | restore_user_regs_last |
---|
64 | 73 | .endm |
---|
65 | 74 | |
---|
66 | | -#ifdef CONFIG_PREEMPT |
---|
| 75 | +#ifdef CONFIG_PREEMPTION |
---|
67 | 76 | .macro preempt_stop |
---|
68 | 77 | .endm |
---|
69 | 78 | #else |
---|
.. | .. |
---|
111 | 120 | andi $p1, $r1, #_TIF_NEED_RESCHED |
---|
112 | 121 | bnez $p1, work_resched |
---|
113 | 122 | |
---|
114 | | - andi $p1, $r1, #_TIF_SIGPENDING|#_TIF_NOTIFY_RESUME |
---|
| 123 | + andi $p1, $r1, #_TIF_SIGPENDING|#_TIF_NOTIFY_RESUME|#_TIF_NOTIFY_SIGNAL |
---|
115 | 124 | beqz $p1, no_work_pending |
---|
116 | 125 | |
---|
117 | 126 | move $r0, $sp ! 'regs' |
---|
.. | .. |
---|
149 | 158 | /* |
---|
150 | 159 | * preemptive kernel |
---|
151 | 160 | */ |
---|
152 | | -#ifdef CONFIG_PREEMPT |
---|
| 161 | +#ifdef CONFIG_PREEMPTION |
---|
153 | 162 | resume_kernel: |
---|
154 | 163 | gie_disable |
---|
155 | 164 | lwi $t0, [tsk+#TSK_TI_PREEMPT] |
---|
156 | 165 | bnez $t0, no_work_pending |
---|
157 | | -need_resched: |
---|
| 166 | + |
---|
158 | 167 | lwi $t0, [tsk+#TSK_TI_FLAGS] |
---|
159 | 168 | andi $p1, $t0, #_TIF_NEED_RESCHED |
---|
160 | 169 | beqz $p1, no_work_pending |
---|
.. | .. |
---|
164 | 173 | beqz $t0, no_work_pending |
---|
165 | 174 | |
---|
166 | 175 | jal preempt_schedule_irq |
---|
167 | | - b need_resched |
---|
| 176 | + b no_work_pending |
---|
168 | 177 | #endif |
---|
169 | 178 | |
---|
170 | 179 | /* |
---|