}
 
        if (last_task_used_math == task) {
-               grab_fpu();
+               enable_fpu();
                fpsave(&task->thread.fpu.hard);
-               release_fpu();
+               disable_fpu();
                last_task_used_math = 0;
                regs->sr |= SR_FD;
        }
                fpinit(&task->thread.fpu.hard);
                set_stopped_child_used_math(task);
        } else if (last_task_used_math == task) {
-               grab_fpu();
+               enable_fpu();
                fpsave(&task->thread.fpu.hard);
-               release_fpu();
+               disable_fpu();
                last_task_used_math = 0;
                regs->sr |= SR_FD;
        }
 
                   context switch the registers into memory so they can be
                   indexed by register number. */
                if (last_task_used_math == current) {
-                       grab_fpu();
+                       enable_fpu();
                        fpsave(¤t->thread.fpu.hard);
-                       release_fpu();
+                       disable_fpu();
                        last_task_used_math = NULL;
                        regs->sr |= SR_FD;
                }
                   context switch the registers into memory so they can be
                   indexed by register number. */
                if (last_task_used_math == current) {
-                       grab_fpu();
+                       enable_fpu();
                        fpsave(¤t->thread.fpu.hard);
-                       release_fpu();
+                       disable_fpu();
                        last_task_used_math = NULL;
                        regs->sr |= SR_FD;
                }
 
 #include <asm/page.h>
 #include <asm/types.h>
 #include <asm/cache.h>
+#include <asm/ptrace.h>
 #include <asm/cpu/registers.h>
 
 /*
  * FPU lazy state save handling.
  */
 
-static inline void release_fpu(void)
+static inline void disable_fpu(void)
 {
        unsigned long long __dummy;
 
                             : "r" (SR_FD));
 }
 
-static inline void grab_fpu(void)
+static inline void enable_fpu(void)
 {
        unsigned long long __dummy;
 
                             : "r" (~SR_FD));
 }
 
+static inline void release_fpu(struct pt_regs *regs)
+{
+       regs->sr |= SR_FD;
+}
+
+static inline void grab_fpu(struct pt_regs *regs)
+{
+       regs->sr &= ~SR_FD;
+}
+
 /* Round to nearest, no exceptions on inexact, overflow, underflow,
    zero-divide, invalid.  Configure option for whether to flush denorms to
    zero, or except if a denorm is encountered.  */