blob: 20a1fbf7fe4e0892a5456c4cf8a68c504b5d93bd [file] [log] [blame]
Ingo Molnarfcbc99c2015-04-30 08:45:02 +02001/*
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
Ingo Molnardecb4c42015-09-05 09:32:43 +02008# include <uapi/asm/sigcontext.h>
Ingo Molnarfcbc99c2015-04-30 08:45:02 +02009# include <asm/user32.h>
10struct ksignal;
11int ia32_setup_rt_frame(int sig, struct ksignal *ksig,
12 compat_sigset_t *set, struct pt_regs *regs);
13int 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
Dmitry Safonov68463512016-09-05 16:33:08 +030022#ifdef CONFIG_COMPAT
23int __copy_siginfo_to_user32(compat_siginfo_t __user *to,
24 const siginfo_t *from, bool x32_ABI);
25#endif
26
27
Ingo Molnarfcbc99c2015-04-30 08:45:02 +020028extern void convert_from_fxsr(struct user_i387_ia32_struct *env,
29 struct task_struct *tsk);
30extern void convert_to_fxsr(struct task_struct *tsk,
31 const struct user_i387_ia32_struct *env);
32
33unsigned long
34fpu__alloc_mathframe(unsigned long sp, int ia32_frame,
35 unsigned long *buf_fx, unsigned long *size);
36
Ingo Molnarb992c662015-04-30 12:45:38 +020037extern void fpu__init_prepare_fx_sw_frame(void);
38
Ingo Molnarfcbc99c2015-04-30 08:45:02 +020039#endif /* _ASM_X86_FPU_SIGNAL_H */