On Tue, Jul 6, 2021 at 6:18 AM Huacai Chen <chenhuacai@xxxxxxxxxxx> wrote: > > This patch adds signal handling support for LoongArch. > > Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx> Eric Biederman should review this part as well. > --- /dev/null > +++ b/arch/loongarch/include/asm/sigcontext.h > @@ -0,0 +1,10 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2020-2021 Loongson Technology Corporation Limited > + */ > +#ifndef _ASM_SIGCONTEXT_H > +#define _ASM_SIGCONTEXT_H > + > +#include <uapi/asm/sigcontext.h> > + > +#endif /* _ASM_SIGCONTEXT_H */ Remove this file > + */ > +#ifndef _UAPI_ASM_SIGINFO_H > +#define _UAPI_ASM_SIGINFO_H > + > +#if _LOONGARCH_SZLONG == 32 > +#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) > +#else > +#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) > +#endif These are no longer used. > + > +#ifndef _NSIG > +#define _NSIG 128 > +#endif Everything else uses 64 here, except for MIPS. > +#define _NSIG_BPW __BITS_PER_LONG > +#define _NSIG_WORDS (_NSIG / _NSIG_BPW) > + > +#define SIGHUP 1 > +#define SIGINT 2 > +#define SIGQUIT 3 > +#define SIGILL 4 > +#define SIGTRAP 5 > +#define SIGABRT 6 > +#define SIGIOT 6 > +#define SIGBUS 7 > +#define SIGFPE 8 > +#define SIGKILL 9 > +#define SIGUSR1 10 > +#define SIGSEGV 11 > +#define SIGUSR2 12 > +#define SIGPIPE 13 > +#define SIGALRM 14 > +#define SIGTERM 15 > +#define SIGSTKFLT 16 > +#define SIGCHLD 17 > +#define SIGCONT 18 > +#define SIGSTOP 19 > +#define SIGTSTP 20 > +#define SIGTTIN 21 > +#define SIGTTOU 22 > +#define SIGURG 23 > +#define SIGXCPU 24 > +#define SIGXFSZ 25 > +#define SIGVTALRM 26 > +#define SIGPROF 27 > +#define SIGWINCH 28 > +#define SIGIO 29 > +#define SIGPOLL SIGIO > +#define SIGPWR 30 > +#define SIGSYS 31 > +#define SIGUNUSED 31 Please try to use the asm-generic version of these definitions instead copying them. If you need something different, you can add an #ifdef there, and then we can discuss whether the difference makes sense. Arnd