18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * x86 FPU signal frame handling methods: 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci#ifndef _ASM_X86_FPU_SIGNAL_H 68c2ecf20Sopenharmony_ci#define _ASM_X86_FPU_SIGNAL_H 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_64 98c2ecf20Sopenharmony_ci# include <uapi/asm/sigcontext.h> 108c2ecf20Sopenharmony_ci# include <asm/user32.h> 118c2ecf20Sopenharmony_cistruct ksignal; 128c2ecf20Sopenharmony_ciint ia32_setup_rt_frame(int sig, struct ksignal *ksig, 138c2ecf20Sopenharmony_ci compat_sigset_t *set, struct pt_regs *regs); 148c2ecf20Sopenharmony_ciint ia32_setup_frame(int sig, struct ksignal *ksig, 158c2ecf20Sopenharmony_ci compat_sigset_t *set, struct pt_regs *regs); 168c2ecf20Sopenharmony_ci#else 178c2ecf20Sopenharmony_ci# define user_i387_ia32_struct user_i387_struct 188c2ecf20Sopenharmony_ci# define user32_fxsr_struct user_fxsr_struct 198c2ecf20Sopenharmony_ci# define ia32_setup_frame __setup_frame 208c2ecf20Sopenharmony_ci# define ia32_setup_rt_frame __setup_rt_frame 218c2ecf20Sopenharmony_ci#endif 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciextern void convert_from_fxsr(struct user_i387_ia32_struct *env, 248c2ecf20Sopenharmony_ci struct task_struct *tsk); 258c2ecf20Sopenharmony_ciextern void convert_to_fxsr(struct fxregs_state *fxsave, 268c2ecf20Sopenharmony_ci const struct user_i387_ia32_struct *env); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciunsigned long 298c2ecf20Sopenharmony_cifpu__alloc_mathframe(unsigned long sp, int ia32_frame, 308c2ecf20Sopenharmony_ci unsigned long *buf_fx, unsigned long *size); 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciextern void fpu__init_prepare_fx_sw_frame(void); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#endif /* _ASM_X86_FPU_SIGNAL_H */ 35