summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/processor_64.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-10 20:27:03 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-01-28 13:18:44 +0900
commit256b22ca66987c537064dc25b0b267966189b5ba (patch)
tree482f095562a3e1614b67de5352f09d4feea673f1 /include/asm-sh/processor_64.h
parent27a511c6f37c05c5cf8fae9fe513f60d87af9158 (diff)
sh: Have SH-5 provide an {en,dis}able_fpu() impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/processor_64.h')
-rw-r--r--include/asm-sh/processor_64.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/asm-sh/processor_64.h b/include/asm-sh/processor_64.h
index ecd6b403f7d..312fd73fb87 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 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
* 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 @@ static inline void release_fpu(void)
: "r" (SR_FD));
}
-static inline void grab_fpu(void)
+static inline void enable_fpu(void)
{
unsigned long long __dummy;
@@ -242,6 +243,16 @@ static inline void grab_fpu(void)
: "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. */