diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-09-21 19:04:55 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-09-21 19:04:55 +0900 |
commit | e7ab3cd251926d57ee11d7d320e8fb42c882ad22 (patch) | |
tree | 29dce1711413e010d30fb62c43cbe517a9de95bc /arch/sh/include/asm/fpu.h | |
parent | 4b4cf7595a8bce9b4dd64c241a8cb7336ecb9489 (diff) | |
download | linux-next-e7ab3cd251926d57ee11d7d320e8fb42c882ad22.tar.gz |
sh: Add FPU registers to regset interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/fpu.h')
-rw-r--r-- | arch/sh/include/asm/fpu.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/sh/include/asm/fpu.h b/arch/sh/include/asm/fpu.h index 91462fea1507..1d3aee04b5cc 100644 --- a/arch/sh/include/asm/fpu.h +++ b/arch/sh/include/asm/fpu.h @@ -30,8 +30,15 @@ static inline void save_fpu(struct task_struct *tsk, struct pt_regs *regs) } #endif +struct user_regset; + extern int do_fpu_inst(unsigned short, struct pt_regs *); +extern int fpregs_get(struct task_struct *target, + const struct user_regset *regset, + unsigned int pos, unsigned int count, + void *kbuf, void __user *ubuf); + static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) { preempt_disable(); @@ -50,6 +57,18 @@ static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) preempt_enable(); } +static inline int init_fpu(struct task_struct *tsk) +{ + if (tsk_used_math(tsk)) { + if ((boot_cpu_data.flags & CPU_HAS_FPU) && tsk == current) + unlazy_fpu(tsk, task_pt_regs(tsk)); + return 0; + } + + set_stopped_child_used_math(tsk); + return 0; +} + #endif /* __ASSEMBLY__ */ #endif /* __ASM_SH_FPU_H */ |