^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * License. See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) 1991, 1992 Linus Torvalds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright (C) 1994 - 2000 Ralf Baechle
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #ifndef __SIGNAL_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define __SIGNAL_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /* #define DEBUG_SIG */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #ifdef DEBUG_SIG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) # define DEBUGP(fmt, args...) printk("%s: " fmt, __func__, ##args)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) # define DEBUGP(fmt, args...)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) * Determine which stack to use..
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) extern void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) size_t frame_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) /* Check and clear pending FPU exceptions in saved CSR */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) extern int fpcsr_pending(unsigned int __user *fpcsr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) /* Make sure we will not lose FPU ownership */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define lock_fpu_owner() ({ preempt_disable(); pagefault_disable(); })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define unlock_fpu_owner() ({ pagefault_enable(); preempt_enable(); })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) /* Assembly functions to move context to/from the FPU */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern asmlinkage int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) _save_fp_context(void __user *fpregs, void __user *csr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) extern asmlinkage int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) _restore_fp_context(void __user *fpregs, void __user *csr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) extern asmlinkage int _save_msa_all_upper(void __user *buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) extern asmlinkage int _restore_msa_all_upper(void __user *buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #endif /* __SIGNAL_COMMON_H */