From patchwork Tue May 29 19:42:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 922353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40wPcz12B5z9s08 for ; Wed, 30 May 2018 05:56:51 +1000 (AEST) Received: from localhost ([::1]:34760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNkjg-00070v-OP for incoming@patchwork.ozlabs.org; Tue, 29 May 2018 15:56:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNkVv-0004MG-A0 for qemu-devel@nongnu.org; Tue, 29 May 2018 15:42:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNkVt-0000YU-MR for qemu-devel@nongnu.org; Tue, 29 May 2018 15:42:35 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:49607) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNkVt-0000Xs-9C for qemu-devel@nongnu.org; Tue, 29 May 2018 15:42:33 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MWvXU-1frUk51Ofk-00W08K; Tue, 29 May 2018 21:42:21 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 21:42:03 +0200 Message-Id: <20180529194207.31503-12-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180529194207.31503-1-laurent@vivier.eu> References: <20180529194207.31503-1-laurent@vivier.eu> X-Provags-ID: V03:K1:6Vhx4Nuene9HnAT+WiwQQtC6YlkwXP12SfqN1B3tKGwhHdobj5x sIr6AbN0UdFKI4gl1cqccL8pc0CdGdCZL7/ypdDdYmPezRkouqSKT1mgmKy5gfKrcErKWK1 DVOZF4DBCTJRQ8Ci9xrEkM7Sld5lBwU8Gex8Do+/6XL7GbKIY7Xr1TQ3kmx71947SsjCmUM G2quWBidPe0La+P89dlLQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:85dfFzq7JHA=:47sWHEGnrYVGJb6KPGxKua 9X7Oi2Etdwmo5t3Z2vBzPJDbGk91PyTz+RlEoeCjf6SVWtrxRbjon74ZKzO1vRM3dZ1jZf0pW rdSK/KB8LYLMQ5yIKes5ep5ijDAC4KZw7IuLzpbu5TYUF0FEmPlD4H1f1vW9BH1JAtWpG/7xm v1e39KN3/3dmfMm11FMsWnOO7GPJ5ZiVMIYJ1+chAbAcN6+/cq+EXqSsYiQ61Quq5TsMZ6FdX GehK0VPBplz2aOK7PdXFK/1R2ZO24emDZNsufwsTnY12GdTWACFDU+SZkPO+D5pmX5ybg4OM2 3PXoLkv4EMLMC6t0cfCLkPOLu8y0hz8WI5EWsGt4ZMkz1c0CeYF9KSQaaEZq3vuhRaUyUgugB Av/cZ5jFQaS27e/VB3jqmqnO070vstjYRnPJhNBIWPyep5xufXh1vtyvpXrY1eYUg5MbZchmr 75ajsS2ITMBOiwFIcqg9Hm+OnRndkoyf9o0iwcHbijXNw+cTfAejNdAh7xazh+lX6VRfByU4q iiwqSzwYZMT6cbZqvHzi+sjwM11RnIaTg8f5U0A3dcEuW/EFih4dzpRvItAtNdo0HtzJgIY5S EqjkMPSpRwDcMsLn4DQPFbt9tDvf9Meb1uebrk6HXqu6ocZYgmSWGmcepl8G6acyF4Xd3oe0E nl9C5je1HkXuvopAWQQ19fm7nh/UKwPZMua4eR0OXRbEAcrWxurSXZVJIrB7sWp5WP7A= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.131 Subject: [Qemu-devel] [PATCH 11/15] linux-user: move mips signal definitions to mips/target_signal.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier --- linux-user/mips/target_signal.h | 50 ++++++++++++++++++++++++++++++++++ linux-user/mips64/target_signal.h | 49 ++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 56 +-------------------------------------- 3 files changed, 100 insertions(+), 55 deletions(-) diff --git a/linux-user/mips/target_signal.h b/linux-user/mips/target_signal.h index 5f68bd7634..66e1ad44a6 100644 --- a/linux-user/mips/target_signal.h +++ b/linux-user/mips/target_signal.h @@ -1,6 +1,47 @@ #ifndef MIPS_TARGET_SIGNAL_H #define MIPS_TARGET_SIGNAL_H +#define TARGET_SIGHUP 1 /* Hangup (POSIX). */ +#define TARGET_SIGINT 2 /* Interrupt (ANSI). */ +#define TARGET_SIGQUIT 3 /* Quit (POSIX). */ +#define TARGET_SIGILL 4 /* Illegal instruction (ANSI). */ +#define TARGET_SIGTRAP 5 /* Trace trap (POSIX). */ +#define TARGET_SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define TARGET_SIGABRT TARGET_SIGIOT /* Abort (ANSI). */ +#define TARGET_SIGEMT 7 +#define TARGET_SIGSTKFLT 7 /* XXX: incorrect */ +#define TARGET_SIGFPE 8 /* Floating-point exception (ANSI). */ +#define TARGET_SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define TARGET_SIGBUS 10 /* BUS error (4.2 BSD). */ +#define TARGET_SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define TARGET_SIGSYS 12 +#define TARGET_SIGPIPE 13 /* Broken pipe (POSIX). */ +#define TARGET_SIGALRM 14 /* Alarm clock (POSIX). */ +#define TARGET_SIGTERM 15 /* Termination (ANSI). */ +#define TARGET_SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define TARGET_SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define TARGET_SIGCHLD 18 /* Child status has changed (POSIX). */ +#define TARGET_SIGCLD TARGET_SIGCHLD /* Same as TARGET_SIGCHLD (System V). */ +#define TARGET_SIGPWR 19 /* Power failure restart (System V). */ +#define TARGET_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define TARGET_SIGURG 21 /* Urgent condition on socket (4.2 BSD). */ +#define TARGET_SIGIO 22 /* I/O now possible (4.2 BSD). */ +#define TARGET_SIGPOLL TARGET_SIGIO /* Pollable event occurred (System V). */ +#define TARGET_SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define TARGET_SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define TARGET_SIGCONT 25 /* Continue (POSIX). */ +#define TARGET_SIGTTIN 26 /* Background read from tty (POSIX). */ +#define TARGET_SIGTTOU 27 /* Background write to tty (POSIX). */ +#define TARGET_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define TARGET_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define TARGET_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define TARGET_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ +#define TARGET_SIGRTMIN 32 + +#define TARGET_SIG_BLOCK 1 /* for blocking signals */ +#define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */ +#define TARGET_SIG_SETMASK 3 /* for setting the signal mask */ + /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -16,6 +57,15 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 +#define TARGET_SA_NOCLDSTOP 0x00000001 +#define TARGET_SA_NOCLDWAIT 0x00010000 +#define TARGET_SA_SIGINFO 0x00000008 +#define TARGET_SA_ONSTACK 0x08000000 +#define TARGET_SA_NODEFER 0x40000000 +#define TARGET_SA_RESTART 0x10000000 +#define TARGET_SA_RESETHAND 0x80000000 +#define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */ + #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 diff --git a/linux-user/mips64/target_signal.h b/linux-user/mips64/target_signal.h index 7fe6b2f517..753e91fbd6 100644 --- a/linux-user/mips64/target_signal.h +++ b/linux-user/mips64/target_signal.h @@ -1,6 +1,47 @@ #ifndef MIPS64_TARGET_SIGNAL_H #define MIPS64_TARGET_SIGNAL_H +#define TARGET_SIGHUP 1 /* Hangup (POSIX). */ +#define TARGET_SIGINT 2 /* Interrupt (ANSI). */ +#define TARGET_SIGQUIT 3 /* Quit (POSIX). */ +#define TARGET_SIGILL 4 /* Illegal instruction (ANSI). */ +#define TARGET_SIGTRAP 5 /* Trace trap (POSIX). */ +#define TARGET_SIGIOT 6 /* IOT trap (4.2 BSD). */ +#define TARGET_SIGABRT TARGET_SIGIOT /* Abort (ANSI). */ +#define TARGET_SIGEMT 7 +#define TARGET_SIGSTKFLT 7 /* XXX: incorrect */ +#define TARGET_SIGFPE 8 /* Floating-point exception (ANSI). */ +#define TARGET_SIGKILL 9 /* Kill, unblockable (POSIX). */ +#define TARGET_SIGBUS 10 /* BUS error (4.2 BSD). */ +#define TARGET_SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define TARGET_SIGSYS 12 +#define TARGET_SIGPIPE 13 /* Broken pipe (POSIX). */ +#define TARGET_SIGALRM 14 /* Alarm clock (POSIX). */ +#define TARGET_SIGTERM 15 /* Termination (ANSI). */ +#define TARGET_SIGUSR1 16 /* User-defined signal 1 (POSIX). */ +#define TARGET_SIGUSR2 17 /* User-defined signal 2 (POSIX). */ +#define TARGET_SIGCHLD 18 /* Child status has changed (POSIX). */ +#define TARGET_SIGCLD TARGET_SIGCHLD /* Same as TARGET_SIGCHLD (System V). */ +#define TARGET_SIGPWR 19 /* Power failure restart (System V). */ +#define TARGET_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ +#define TARGET_SIGURG 21 /* Urgent condition on socket (4.2 BSD). */ +#define TARGET_SIGIO 22 /* I/O now possible (4.2 BSD). */ +#define TARGET_SIGPOLL TARGET_SIGIO /* Pollable event occurred (System V). */ +#define TARGET_SIGSTOP 23 /* Stop, unblockable (POSIX). */ +#define TARGET_SIGTSTP 24 /* Keyboard stop (POSIX). */ +#define TARGET_SIGCONT 25 /* Continue (POSIX). */ +#define TARGET_SIGTTIN 26 /* Background read from tty (POSIX). */ +#define TARGET_SIGTTOU 27 /* Background write to tty (POSIX). */ +#define TARGET_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ +#define TARGET_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ +#define TARGET_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ +#define TARGET_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ +#define TARGET_SIGRTMIN 32 + +#define TARGET_SIG_BLOCK 1 /* for blocking signals */ +#define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */ +#define TARGET_SIG_SETMASK 3 /* for setting the signal mask */ + /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -16,6 +57,14 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 +#define TARGET_SA_NOCLDSTOP 0x00000001 +#define TARGET_SA_NOCLDWAIT 0x00010000 +#define TARGET_SA_SIGINFO 0x00000008 +#define TARGET_SA_ONSTACK 0x08000000 +#define TARGET_SA_NODEFER 0x40000000 +#define TARGET_SA_RESTART 0x10000000 +#define TARGET_SA_RESETHAND 0x80000000 + #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 0034156c6b..21d3ef5559 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -426,18 +426,7 @@ int do_sigaction(int sig, const struct target_sigaction *act, || defined(TARGET_TILEGX) || defined(TARGET_HPPA) || defined(TARGET_NIOS2) \ || defined(TARGET_RISCV) || defined(TARGET_XTENSA) -#if defined(TARGET_MIPS) -#define TARGET_SA_NOCLDSTOP 0x00000001 -#define TARGET_SA_NOCLDWAIT 0x00010000 -#define TARGET_SA_SIGINFO 0x00000008 -#define TARGET_SA_ONSTACK 0x08000000 -#define TARGET_SA_NODEFER 0x40000000 -#define TARGET_SA_RESTART 0x10000000 -#define TARGET_SA_RESETHAND 0x80000000 -#if !defined(TARGET_ABI_MIPSN32) && !defined(TARGET_ABI_MIPSN64) -#define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */ -#endif -#elif defined(TARGET_OPENRISC) +#if defined(TARGET_OPENRISC) #define TARGET_SA_NOCLDSTOP 0x00000001 #define TARGET_SA_NOCLDWAIT 0x00000002 #define TARGET_SA_SIGINFO 0x00000004 @@ -508,49 +497,6 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SIG_UNBLOCK 2 #define TARGET_SIG_SETMASK 3 -#elif defined(TARGET_MIPS) - -#define TARGET_SIGHUP 1 /* Hangup (POSIX). */ -#define TARGET_SIGINT 2 /* Interrupt (ANSI). */ -#define TARGET_SIGQUIT 3 /* Quit (POSIX). */ -#define TARGET_SIGILL 4 /* Illegal instruction (ANSI). */ -#define TARGET_SIGTRAP 5 /* Trace trap (POSIX). */ -#define TARGET_SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define TARGET_SIGABRT TARGET_SIGIOT /* Abort (ANSI). */ -#define TARGET_SIGEMT 7 -#define TARGET_SIGSTKFLT 7 /* XXX: incorrect */ -#define TARGET_SIGFPE 8 /* Floating-point exception (ANSI). */ -#define TARGET_SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define TARGET_SIGBUS 10 /* BUS error (4.2 BSD). */ -#define TARGET_SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define TARGET_SIGSYS 12 -#define TARGET_SIGPIPE 13 /* Broken pipe (POSIX). */ -#define TARGET_SIGALRM 14 /* Alarm clock (POSIX). */ -#define TARGET_SIGTERM 15 /* Termination (ANSI). */ -#define TARGET_SIGUSR1 16 /* User-defined signal 1 (POSIX). */ -#define TARGET_SIGUSR2 17 /* User-defined signal 2 (POSIX). */ -#define TARGET_SIGCHLD 18 /* Child status has changed (POSIX). */ -#define TARGET_SIGCLD TARGET_SIGCHLD /* Same as TARGET_SIGCHLD (System V). */ -#define TARGET_SIGPWR 19 /* Power failure restart (System V). */ -#define TARGET_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ -#define TARGET_SIGURG 21 /* Urgent condition on socket (4.2 BSD). */ -#define TARGET_SIGIO 22 /* I/O now possible (4.2 BSD). */ -#define TARGET_SIGPOLL TARGET_SIGIO /* Pollable event occurred (System V). */ -#define TARGET_SIGSTOP 23 /* Stop, unblockable (POSIX). */ -#define TARGET_SIGTSTP 24 /* Keyboard stop (POSIX). */ -#define TARGET_SIGCONT 25 /* Continue (POSIX). */ -#define TARGET_SIGTTIN 26 /* Background read from tty (POSIX). */ -#define TARGET_SIGTTOU 27 /* Background write to tty (POSIX). */ -#define TARGET_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ -#define TARGET_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ -#define TARGET_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ -#define TARGET_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ -#define TARGET_SIGRTMIN 32 - -#define TARGET_SIG_BLOCK 1 /* for blocking signals */ -#define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */ -#define TARGET_SIG_SETMASK 3 /* for setting the signal mask */ - #elif defined(TARGET_HPPA) #define TARGET_SIGHUP 1