aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/traps.c')
-rw-r--r--arch/ia64/kernel/traps.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index 9bad6652d531..1861173bd4f6 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -220,13 +220,21 @@ disabled_fph_fault (struct pt_regs *regs)
220 220
221 /* first, grant user-level access to fph partition: */ 221 /* first, grant user-level access to fph partition: */
222 psr->dfh = 0; 222 psr->dfh = 0;
223
224 /*
225 * Make sure that no other task gets in on this processor
226 * while we're claiming the FPU
227 */
228 preempt_disable();
223#ifndef CONFIG_SMP 229#ifndef CONFIG_SMP
224 { 230 {
225 struct task_struct *fpu_owner 231 struct task_struct *fpu_owner
226 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER); 232 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER);
227 233
228 if (ia64_is_local_fpu_owner(current)) 234 if (ia64_is_local_fpu_owner(current)) {
235 preempt_enable_no_resched();
229 return; 236 return;
237 }
230 238
231 if (fpu_owner) 239 if (fpu_owner)
232 ia64_flush_fph(fpu_owner); 240 ia64_flush_fph(fpu_owner);
@@ -244,6 +252,7 @@ disabled_fph_fault (struct pt_regs *regs)
244 */ 252 */
245 psr->mfh = 1; 253 psr->mfh = 1;
246 } 254 }
255 preempt_enable_no_resched();
247} 256}
248 257
249static inline int 258static inline int