aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/processor_64.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-10 06:27:03 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:44 -0500
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 ecd6b403f7db..312fd73fb87e 100644
--- a/include/asm-sh/processor_64.h
+++ b/include/asm-sh/processor_64.h
@@ -18,6 +18,7 @@
18#include <asm/page.h> 18#include <asm/page.h>
19#include <asm/types.h> 19#include <asm/types.h>
20#include <asm/cache.h> 20#include <asm/cache.h>
21#include <asm/ptrace.h>
21#include <asm/cpu/registers.h> 22#include <asm/cpu/registers.h>
22 23
23/* 24/*
@@ -218,7 +219,7 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
218 * FPU lazy state save handling. 219 * FPU lazy state save handling.
219 */ 220 */
220 221
221static inline void release_fpu(void) 222static inline void disable_fpu(void)
222{ 223{
223 unsigned long long __dummy; 224 unsigned long long __dummy;
224 225
@@ -230,7 +231,7 @@ static inline void release_fpu(void)
230 : "r" (SR_FD)); 231 : "r" (SR_FD));
231} 232}
232 233
233static inline void grab_fpu(void) 234static inline void enable_fpu(void)
234{ 235{
235 unsigned long long __dummy; 236 unsigned long long __dummy;
236 237
@@ -242,6 +243,16 @@ static inline void grab_fpu(void)
242 : "r" (~SR_FD)); 243 : "r" (~SR_FD));
243} 244}
244 245
246static inline void release_fpu(struct pt_regs *regs)
247{
248 regs->sr |= SR_FD;
249}
250
251static inline void grab_fpu(struct pt_regs *regs)
252{
253 regs->sr &= ~SR_FD;
254}
255
245/* Round to nearest, no exceptions on inexact, overflow, underflow, 256/* Round to nearest, no exceptions on inexact, overflow, underflow,
246 zero-divide, invalid. Configure option for whether to flush denorms to 257 zero-divide, invalid. Configure option for whether to flush denorms to
247 zero, or except if a denorm is encountered. */ 258 zero, or except if a denorm is encountered. */