Re: [PATCH 10/19] LoongArch: Add signal handling support

From
Arnd Bergmann <arnd@kernel.org>
Date
2021-07-06 10:59:26
Reply to
Arnd Bergmann, 2021-07-06
On Tue, Jul 6, 2021 at 6:18 AM Huacai Chen [off-list ref] wrote:
This patch adds signal handling support for LoongArch.

Signed-off-by: Huacai Chen <redacted>
Eric Biederman should review this part as well.
quoted hunk ↗ jump to hunk
--- /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
quoted hunk ↗ jump to hunk
+ */
+#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.
quoted hunk ↗ jump to hunk
+
+#ifndef _NSIG
+#define _NSIG          128
+#endif
Everything else uses 64 here, except for MIPS.

quoted hunk ↗ jump to hunk
+#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
Thread (110 messages) 110 messages, 12 authors, last reply 2021-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help