xref: /openbmc/linux/arch/x86/include/asm/fpu/signal.h (revision 293d5b43)
1 /*
2  * x86 FPU signal frame handling methods:
3  */
4 #ifndef _ASM_X86_FPU_SIGNAL_H
5 #define _ASM_X86_FPU_SIGNAL_H
6 
7 #ifdef CONFIG_X86_64
8 # include <uapi/asm/sigcontext.h>
9 # include <asm/user32.h>
10 struct ksignal;
11 int ia32_setup_rt_frame(int sig, struct ksignal *ksig,
12 			compat_sigset_t *set, struct pt_regs *regs);
13 int ia32_setup_frame(int sig, struct ksignal *ksig,
14 		     compat_sigset_t *set, struct pt_regs *regs);
15 #else
16 # define user_i387_ia32_struct	user_i387_struct
17 # define user32_fxsr_struct	user_fxsr_struct
18 # define ia32_setup_frame	__setup_frame
19 # define ia32_setup_rt_frame	__setup_rt_frame
20 #endif
21 
22 extern void convert_from_fxsr(struct user_i387_ia32_struct *env,
23 			      struct task_struct *tsk);
24 extern void convert_to_fxsr(struct task_struct *tsk,
25 			    const struct user_i387_ia32_struct *env);
26 
27 unsigned long
28 fpu__alloc_mathframe(unsigned long sp, int ia32_frame,
29 		     unsigned long *buf_fx, unsigned long *size);
30 
31 extern void fpu__init_prepare_fx_sw_frame(void);
32 
33 #endif /* _ASM_X86_FPU_SIGNAL_H */
34