sh: Have SH-5 provide an {en,dis}able_fpu() impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
diff --git a/include/asm-sh/processor_64.h b/include/asm-sh/processor_64.h
index ecd6b40..312fd73 100644
--- a/include/asm-sh/processor_64.h
+++ b/include/asm-sh/processor_64.h
@@ -18,6 +18,7 @@
#include <asm/page.h>
#include <asm/types.h>
#include <asm/cache.h>
+#include <asm/ptrace.h>
#include <asm/cpu/registers.h>
/*
@@ -218,7 +219,7 @@
* FPU lazy state save handling.
*/
-static inline void release_fpu(void)
+static inline void disable_fpu(void)
{
unsigned long long __dummy;
@@ -230,7 +231,7 @@
: "r" (SR_FD));
}
-static inline void grab_fpu(void)
+static inline void enable_fpu(void)
{
unsigned long long __dummy;
@@ -242,6 +243,16 @@
: "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. */