18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_POWERPC_SIGNAL_H 38c2ecf20Sopenharmony_ci#define _UAPI_ASM_POWERPC_SIGNAL_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/types.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#define _NSIG 64 88c2ecf20Sopenharmony_ci#ifdef __powerpc64__ 98c2ecf20Sopenharmony_ci#define _NSIG_BPW 64 108c2ecf20Sopenharmony_ci#else 118c2ecf20Sopenharmony_ci#define _NSIG_BPW 32 128c2ecf20Sopenharmony_ci#endif 138c2ecf20Sopenharmony_ci#define _NSIG_WORDS (_NSIG / _NSIG_BPW) 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_citypedef unsigned long old_sigset_t; /* at least 32 bits */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_citypedef struct { 188c2ecf20Sopenharmony_ci unsigned long sig[_NSIG_WORDS]; 198c2ecf20Sopenharmony_ci} sigset_t; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define SIGHUP 1 228c2ecf20Sopenharmony_ci#define SIGINT 2 238c2ecf20Sopenharmony_ci#define SIGQUIT 3 248c2ecf20Sopenharmony_ci#define SIGILL 4 258c2ecf20Sopenharmony_ci#define SIGTRAP 5 268c2ecf20Sopenharmony_ci#define SIGABRT 6 278c2ecf20Sopenharmony_ci#define SIGIOT 6 288c2ecf20Sopenharmony_ci#define SIGBUS 7 298c2ecf20Sopenharmony_ci#define SIGFPE 8 308c2ecf20Sopenharmony_ci#define SIGKILL 9 318c2ecf20Sopenharmony_ci#define SIGUSR1 10 328c2ecf20Sopenharmony_ci#define SIGSEGV 11 338c2ecf20Sopenharmony_ci#define SIGUSR2 12 348c2ecf20Sopenharmony_ci#define SIGPIPE 13 358c2ecf20Sopenharmony_ci#define SIGALRM 14 368c2ecf20Sopenharmony_ci#define SIGTERM 15 378c2ecf20Sopenharmony_ci#define SIGSTKFLT 16 388c2ecf20Sopenharmony_ci#define SIGCHLD 17 398c2ecf20Sopenharmony_ci#define SIGCONT 18 408c2ecf20Sopenharmony_ci#define SIGSTOP 19 418c2ecf20Sopenharmony_ci#define SIGTSTP 20 428c2ecf20Sopenharmony_ci#define SIGTTIN 21 438c2ecf20Sopenharmony_ci#define SIGTTOU 22 448c2ecf20Sopenharmony_ci#define SIGURG 23 458c2ecf20Sopenharmony_ci#define SIGXCPU 24 468c2ecf20Sopenharmony_ci#define SIGXFSZ 25 478c2ecf20Sopenharmony_ci#define SIGVTALRM 26 488c2ecf20Sopenharmony_ci#define SIGPROF 27 498c2ecf20Sopenharmony_ci#define SIGWINCH 28 508c2ecf20Sopenharmony_ci#define SIGIO 29 518c2ecf20Sopenharmony_ci#define SIGPOLL SIGIO 528c2ecf20Sopenharmony_ci/* 538c2ecf20Sopenharmony_ci#define SIGLOST 29 548c2ecf20Sopenharmony_ci*/ 558c2ecf20Sopenharmony_ci#define SIGPWR 30 568c2ecf20Sopenharmony_ci#define SIGSYS 31 578c2ecf20Sopenharmony_ci#define SIGUNUSED 31 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* These should not be considered constants from userland. */ 608c2ecf20Sopenharmony_ci#define SIGRTMIN 32 618c2ecf20Sopenharmony_ci#define SIGRTMAX _NSIG 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci/* 648c2ecf20Sopenharmony_ci * SA_FLAGS values: 658c2ecf20Sopenharmony_ci * 668c2ecf20Sopenharmony_ci * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). 678c2ecf20Sopenharmony_ci * SA_RESTART flag to get restarting signals (which were the default long ago) 688c2ecf20Sopenharmony_ci * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 698c2ecf20Sopenharmony_ci * SA_RESETHAND clears the handler when the signal is delivered. 708c2ecf20Sopenharmony_ci * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 718c2ecf20Sopenharmony_ci * SA_NODEFER prevents the current signal from being masked in the handler. 728c2ecf20Sopenharmony_ci * 738c2ecf20Sopenharmony_ci * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 748c2ecf20Sopenharmony_ci * Unix names RESETHAND and NODEFER respectively. 758c2ecf20Sopenharmony_ci */ 768c2ecf20Sopenharmony_ci#define SA_NOCLDSTOP 0x00000001U 778c2ecf20Sopenharmony_ci#define SA_NOCLDWAIT 0x00000002U 788c2ecf20Sopenharmony_ci#define SA_SIGINFO 0x00000004U 798c2ecf20Sopenharmony_ci#define SA_ONSTACK 0x08000000U 808c2ecf20Sopenharmony_ci#define SA_RESTART 0x10000000U 818c2ecf20Sopenharmony_ci#define SA_NODEFER 0x40000000U 828c2ecf20Sopenharmony_ci#define SA_RESETHAND 0x80000000U 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci#define SA_NOMASK SA_NODEFER 858c2ecf20Sopenharmony_ci#define SA_ONESHOT SA_RESETHAND 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci#define SA_RESTORER 0x04000000U 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#define MINSIGSTKSZ 2048 908c2ecf20Sopenharmony_ci#define SIGSTKSZ 8192 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#include <asm-generic/signal-defs.h> 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci#ifndef __KERNEL__ 958c2ecf20Sopenharmony_cistruct old_sigaction { 968c2ecf20Sopenharmony_ci __sighandler_t sa_handler; 978c2ecf20Sopenharmony_ci old_sigset_t sa_mask; 988c2ecf20Sopenharmony_ci unsigned long sa_flags; 998c2ecf20Sopenharmony_ci __sigrestore_t sa_restorer; 1008c2ecf20Sopenharmony_ci}; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_cistruct sigaction { 1038c2ecf20Sopenharmony_ci __sighandler_t sa_handler; 1048c2ecf20Sopenharmony_ci unsigned long sa_flags; 1058c2ecf20Sopenharmony_ci __sigrestore_t sa_restorer; 1068c2ecf20Sopenharmony_ci sigset_t sa_mask; /* mask last for extensibility */ 1078c2ecf20Sopenharmony_ci}; 1088c2ecf20Sopenharmony_ci#endif 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_citypedef struct sigaltstack { 1118c2ecf20Sopenharmony_ci void __user *ss_sp; 1128c2ecf20Sopenharmony_ci int ss_flags; 1138c2ecf20Sopenharmony_ci size_t ss_size; 1148c2ecf20Sopenharmony_ci} stack_t; 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci#ifndef __powerpc64__ 1188c2ecf20Sopenharmony_ci/* 1198c2ecf20Sopenharmony_ci * These are parameters to dbg_sigreturn syscall. They enable or 1208c2ecf20Sopenharmony_ci * disable certain debugging things that can be done from signal 1218c2ecf20Sopenharmony_ci * handlers. The dbg_sigreturn syscall *must* be called from a 1228c2ecf20Sopenharmony_ci * SA_SIGINFO signal so the ucontext can be passed to it. It takes an 1238c2ecf20Sopenharmony_ci * array of struct sig_dbg_op, which has the debug operations to 1248c2ecf20Sopenharmony_ci * perform before returning from the signal. 1258c2ecf20Sopenharmony_ci */ 1268c2ecf20Sopenharmony_cistruct sig_dbg_op { 1278c2ecf20Sopenharmony_ci int dbg_type; 1288c2ecf20Sopenharmony_ci unsigned long dbg_value; 1298c2ecf20Sopenharmony_ci}; 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/* Enable or disable single-stepping. The value sets the state. */ 1328c2ecf20Sopenharmony_ci#define SIG_DBG_SINGLE_STEPPING 1 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci/* Enable or disable branch tracing. The value sets the state. */ 1358c2ecf20Sopenharmony_ci#define SIG_DBG_BRANCH_TRACING 2 1368c2ecf20Sopenharmony_ci#endif /* ! __powerpc64__ */ 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_POWERPC_SIGNAL_H */ 139