[SPARC]: Fix TIF_USEDFPU flag atomicity
From: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
c0a79b229a
commit
54f565ea89
@@ -259,7 +259,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
|
||||
} else {
|
||||
fpload(¤t->thread.float_regs[0], ¤t->thread.fsr);
|
||||
}
|
||||
current_thread_info()->flags |= _TIF_USEDFPU;
|
||||
set_thread_flag(TIF_USEDFPU);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
|
||||
#ifndef CONFIG_SMP
|
||||
if(!fpt) {
|
||||
#else
|
||||
if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
|
||||
if (!test_tsk_thread_flag(fpt, TIF_USEDFPU)) {
|
||||
#endif
|
||||
fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
|
||||
regs->psr &= ~PSR_EF;
|
||||
@@ -333,7 +333,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
|
||||
/* nope, better SIGFPE the offending process... */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
|
||||
clear_tsk_thread_flag(fpt, TIF_USEDFPU);
|
||||
#endif
|
||||
if(psr & PSR_PS) {
|
||||
/* The first fsr store/load we tried trapped,
|
||||
|
Reference in New Issue
Block a user