diff options
Diffstat (limited to 'arch/sh/include/asm/fpu.h')
-rw-r--r-- | arch/sh/include/asm/fpu.h | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/arch/sh/include/asm/fpu.h b/arch/sh/include/asm/fpu.h index fb6bbb9b1cc..06c4281aab6 100644 --- a/arch/sh/include/asm/fpu.h +++ b/arch/sh/include/asm/fpu.h | |||
@@ -2,8 +2,8 @@ | |||
2 | #define __ASM_SH_FPU_H | 2 | #define __ASM_SH_FPU_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | #include <linux/preempt.h> | 5 | |
6 | #include <asm/ptrace.h> | 6 | struct task_struct; |
7 | 7 | ||
8 | #ifdef CONFIG_SH_FPU | 8 | #ifdef CONFIG_SH_FPU |
9 | static inline void release_fpu(struct pt_regs *regs) | 9 | static inline void release_fpu(struct pt_regs *regs) |
@@ -16,22 +16,23 @@ static inline void grab_fpu(struct pt_regs *regs) | |||
16 | regs->sr &= ~SR_FD; | 16 | regs->sr &= ~SR_FD; |
17 | } | 17 | } |
18 | 18 | ||
19 | struct task_struct; | ||
20 | |||
21 | extern void save_fpu(struct task_struct *__tsk); | 19 | extern void save_fpu(struct task_struct *__tsk); |
22 | void fpu_state_restore(struct pt_regs *regs); | 20 | extern void restore_fpu(struct task_struct *__tsk); |
21 | extern void fpu_state_restore(struct pt_regs *regs); | ||
22 | extern void __fpu_state_restore(void); | ||
23 | #else | 23 | #else |
24 | 24 | #define save_fpu(tsk) do { } while (0) | |
25 | #define save_fpu(tsk) do { } while (0) | 25 | #define restore_fpu(tsk) do { } while (0) |
26 | #define release_fpu(regs) do { } while (0) | 26 | #define release_fpu(regs) do { } while (0) |
27 | #define grab_fpu(regs) do { } while (0) | 27 | #define grab_fpu(regs) do { } while (0) |
28 | #define fpu_state_restore(regs) do { } while (0) | 28 | #define fpu_state_restore(regs) do { } while (0) |
29 | 29 | #define __fpu_state_restore(regs) do { } while (0) | |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | struct user_regset; | 32 | struct user_regset; |
33 | 33 | ||
34 | extern int do_fpu_inst(unsigned short, struct pt_regs *); | 34 | extern int do_fpu_inst(unsigned short, struct pt_regs *); |
35 | extern int init_fpu(struct task_struct *); | ||
35 | 36 | ||
36 | extern int fpregs_get(struct task_struct *target, | 37 | extern int fpregs_get(struct task_struct *target, |
37 | const struct user_regset *regset, | 38 | const struct user_regset *regset, |
@@ -65,18 +66,6 @@ static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) | |||
65 | preempt_enable(); | 66 | preempt_enable(); |
66 | } | 67 | } |
67 | 68 | ||
68 | static inline int init_fpu(struct task_struct *tsk) | ||
69 | { | ||
70 | if (tsk_used_math(tsk)) { | ||
71 | if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current) | ||
72 | unlazy_fpu(tsk, task_pt_regs(tsk)); | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | set_stopped_child_used_math(tsk); | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | #endif /* __ASSEMBLY__ */ | 69 | #endif /* __ASSEMBLY__ */ |
81 | 70 | ||
82 | #endif /* __ASM_SH_FPU_H */ | 71 | #endif /* __ASM_SH_FPU_H */ |