Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / sparc / kernel / traps.c
index ceb4a8f..41d45c2 100644 (file)
@@ -246,17 +246,17 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
                       &fptask->thread.fpqueue[0], &fptask->thread.fpqdepth);
        }
        last_task_used_math = current;
-       if(current->used_math) {
+       if(used_math()) {
                fpload(&current->thread.float_regs[0], &current->thread.fsr);
        } else {
                /* Set initial sane state. */
                fpload(&init_fregs[0], &init_fsr);
-               current->used_math = 1;
+               set_used_math();
        }
 #else
-       if(!current->used_math) {
+       if(!used_math()) {
                fpload(&init_fregs[0], &init_fsr);
-               current->used_math = 1;
+               set_used_math();
        } else {
                fpload(&current->thread.float_regs[0], &current->thread.fsr);
        }
@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
 #ifndef CONFIG_SMP
        if(!fpt) {
 #else
-        if(!(fpt->thread_info->flags & _TIF_USEDFPU)) {
+        if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
 #endif
                fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
                regs->psr &= ~PSR_EF;
@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
        /* nope, better SIGFPE the offending process... */
               
 #ifdef CONFIG_SMP
-       fpt->thread_info->flags &= ~_TIF_USEDFPU;
+       task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
 #endif
        if(psr & PSR_PS) {
                /* The first fsr store/load we tried trapped,