Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) 2012 ARM Ltd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #ifndef __ASM_SIGNAL32_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #define __ASM_SIGNAL32_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #ifdef CONFIG_COMPAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/compat.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct compat_sigcontext {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 	/* We always set these two fields to 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	compat_ulong_t			trap_no;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	compat_ulong_t			error_code;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	compat_ulong_t			oldmask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	compat_ulong_t			arm_r0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	compat_ulong_t			arm_r1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	compat_ulong_t			arm_r2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	compat_ulong_t			arm_r3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	compat_ulong_t			arm_r4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	compat_ulong_t			arm_r5;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	compat_ulong_t			arm_r6;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	compat_ulong_t			arm_r7;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	compat_ulong_t			arm_r8;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	compat_ulong_t			arm_r9;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	compat_ulong_t			arm_r10;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	compat_ulong_t			arm_fp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	compat_ulong_t			arm_ip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	compat_ulong_t			arm_sp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	compat_ulong_t			arm_lr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	compat_ulong_t			arm_pc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	compat_ulong_t			arm_cpsr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	compat_ulong_t			fault_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct compat_ucontext {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	compat_ulong_t			uc_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	compat_uptr_t			uc_link;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	compat_stack_t			uc_stack;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 	struct compat_sigcontext	uc_mcontext;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 	compat_sigset_t			uc_sigmask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 	int 				__unused[32 - (sizeof(compat_sigset_t) / sizeof(int))];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 	compat_ulong_t			uc_regspace[128] __attribute__((__aligned__(8)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) struct compat_sigframe {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	struct compat_ucontext	uc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	compat_ulong_t		retcode[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) struct compat_rt_sigframe {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 	struct compat_siginfo info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 	struct compat_sigframe sig;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) int compat_setup_frame(int usig, struct ksignal *ksig, sigset_t *set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 		       struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 			  struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) void compat_setup_restart_syscall(struct pt_regs *regs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) static inline int compat_setup_frame(int usid, struct ksignal *ksig,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 				     sigset_t *set, struct pt_regs *regs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) 	return -ENOSYS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) static inline int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) 					struct pt_regs *regs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) 	return -ENOSYS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) static inline void compat_setup_restart_syscall(struct pt_regs *regs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) #endif /* CONFIG_COMPAT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) #endif /* __ASM_SIGNAL32_H */