From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751714AbeCZNEG (ORCPT ); Mon, 26 Mar 2018 09:04:06 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:40961 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbeCZNEC (ORCPT ); Mon, 26 Mar 2018 09:04:02 -0400 X-Google-Smtp-Source: AG47ELu4u8Jk4zLWxVH3X0jvq9VecDGtcP33vijB5JkoGhLZWW5dnSPYzl1KiwjfcPpmDmP4ikaNGEbTkg+NNgmK1jc= MIME-Version: 1.0 In-Reply-To: References: From: Arnd Bergmann Date: Mon, 26 Mar 2018 15:04:01 +0200 X-Google-Sender-Auth: fvgHpK3dcAFZhR4W9SSHXtzxPDI Message-ID: Subject: Re: [PATCH 10/19] csky: Signal handling To: Guo Ren Cc: linux-arch , Linux Kernel Mailing List , Thomas Gleixner , Daniel Lezcano , Jason Cooper , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 18, 2018 at 8:51 PM, Guo Ren wrote: > Signed-off-by: Guo Ren > --- > arch/csky/include/uapi/asm/sigcontext.h | 33 +++ > arch/csky/include/uapi/asm/signal.h | 164 ++++++++++++++ > arch/csky/kernel/signal.c | 379 ++++++++++++++++++++++++++++++++ > 3 files changed, 576 insertions(+) Please have a look at arch/riscv and arch/nds32 for this, I think it can be simplified. This is an incompatible change of course, but when we change the system call ABI anyway, that is the right time to do it. > +#define NSIG 32 > +typedef unsigned long sigset_t; > + > +#endif /* __KERNEL__ */ > + > +#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 In particular the constants should come from the asm-generic headers rather than being duplicated. If you need anything special, it may be better to modify the generic headers. Arnd