From patchwork Mon Jun 4 15:19:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925087 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 40zzHp1CVBz9s0w for ; Tue, 5 Jun 2018 01:24:21 +1000 (AEST) Received: from localhost ([::1]:40351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrLH-0004tE-7U for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:24:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHp-0002AD-Qs for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHo-0005yc-OA for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:45 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:48495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHo-0005xh-Dl for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:44 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MPvMs-1fLzf22dxy-0052rd; Mon, 04 Jun 2018 17:20:30 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:19:59 +0200 Message-Id: <20180604152015.13359-2-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Ffhcx4cdEOU53BxjWkNclSsjalmFBLLH41k76H9XrS1vhW4RbSw dPG+n1lI6s8VLQeciVyazjEbLv1/RInbXTvZucuCaZOUNDJqoYBwQTPpj5i+Cfrt+SBzTwp zHyt+c6Yg2jfzDNGFmGGf7GAZSGJ/JPUwEx7BYAUpkUxCAzWcTkYahy23pvgZQXETrXCkF2 lyL12gnDBCYIaKJHslJdQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Ozvu5uNr6so=:Vk2I5yCFXXVDOeRf0CAW2U afRLt23Illtx7RL8VUqdBuSFz6Bj3VbiqrMP7ItLGvlL9pTdfNWuO4+tisDVee1hc+DSt8RqA 0lJmDxfdnwxg6j0JHahJZMJzJMw3sXgZuy0rcDfhv5eI8UmHfQD91xiCgVpelYQH/TPFcQwcY k/OEa9ehSTvJoXSogcXAGYyKR41Abppa4hcbIr/faVQkB4M3T58yfKuCn61al/XkwK+2IAGai XlmvLkuLW8GG1YfST+wN8JIiVgVZUuMQdlUrOn0md+/RTRLeQGSsagVa2nrxmINIfa8rDoigL hB0GsPdFoVpUznpPAwjJqzNiZOGiGWk2X6zDHNk1wIdx2a7uj7+7f3WJZ8Or6WHOGzb90ExHW 4Ddd3flPjOdZ4Z4UaSGQKTnFbO28jKsESAfo85F90uQe0EoRX9eRhGcYEGF6bsBafviVg20w/ 4ybVC/QZt8b5EqkarIX1O4SPIShOkdIravCAigA+iKLp6hEUU2FssoujO/jmOiu5JFYWEwIw4 ugT9OTYBrgi9LN0fJmZT2oDLyFh1excIojoJeODw1Bqx0BN3CM9HHPUHNvUScObXeH0eM7Dwj WuL9f8RjiyygdfzAwwDkftSCZCS9ndtbFpzzx0nih7dfy4nEkdEkfu4aVEY+D5JlgwNUk4wTe LLAdqsnhfobLNodKRxgLSuFyv+D1bJcMyr0s0NrKr/4r4Mc9skYdKNc2RVK3MQpw3vTEibNla pLw01zLR8E59Ugsy X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL 01/17] syscall: replace strcpy() by g_strlcpy() 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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé linux-user/syscall.c:9860:17: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 strcpy (buf->machine, cpu_to_uname_machine(cpu_env)); ^~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20170724182751.18261-32-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d02c16bbc6..7b9ac3b408 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -10156,7 +10156,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, if (!is_error(ret)) { /* Overwrite the native machine name with whatever is being emulated. */ - strcpy (buf->machine, cpu_to_uname_machine(cpu_env)); + g_strlcpy(buf->machine, cpu_to_uname_machine(cpu_env), + sizeof(buf->machine)); /* Allow the user to override the reported release. */ if (qemu_uname_release && *qemu_uname_release) { g_strlcpy(buf->release, qemu_uname_release, From patchwork Mon Jun 4 15:20:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925100 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 40zzLf6Ynjz9s0w for ; Tue, 5 Jun 2018 01:26:50 +1000 (AEST) Received: from localhost ([::1]:40369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrNg-0007fp-Is for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:26:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHt-0002Ch-A7 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHp-00060f-W0 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:49 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:43201) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHp-0005yo-L1 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:45 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LdyNE-1g4hnP0tn2-00pxfn; Mon, 04 Jun 2018 17:20:31 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:00 +0200 Message-Id: <20180604152015.13359-3-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:4oPks0S7VdH1ECvbv/bTecQG0FOIZINXibkwQRRlqONLDk4l8Hl HiS2QG8C+Oi9LaM1RTGCYwqpkOISOPBkzhorIXiGwxsynlbPG6Wx0oWjAUmq/FCfquidq2K 71kz/a+wpL6AM7fyxvWT3EMV2nBl8Gpd1NWJw+zsJ7TCo+l0oY2R4J5841grH6oGQt2vRpl D0Mn3rSrH26QLw77xOUOA== X-UI-Out-Filterresults: notjunk:1; V01:K0:7hV+16LbQQg=:m3PdqeMBOhJaxDgLdXBv9I ruxGcMX/o4fwwrpdweb+o69PR44uYjvEO4x7ME34rIjjNS9CR+tuLRVMWIYY+HtxRyakhN0u0 CkaKtnzvN2n9srhrGC8AtZtKDkdaZ10BAD9zlLaHyGExfJ45pckqCU3Fl9aNxx5idzzVcBxm7 w+VLg2R4OY69jp29CvhZNSjqdkBfLvVs9D2QfDUo/ETLAUwmC4itUtI6NS6YRiQ2H660kANcZ LwpattRng9YPHVIQAiJcqapPSFzyLb+JnJZnVSJlWStuRySYaiG6lrHmHyowF8uZELFdyxlvX lf9vLOxQgGolNiKD1SZ8H3qTxAkISNQ2HSsHZKScD5XE5QGQ8D2PsPgoTzfV9bHL0WgPOGPbu gY4TlhSRZ92ypvdMD7i9YXW+tNkFRWElc7VX2N6SY/P/mpoja7fNMs5yW0vHS5lCkHOlsBaaX Bl+DU25BojKvESddUrOuRGzwlbioeWnKtPod2KH/Bzh4Df5+AekTpdlPzp2+/2omiCxmfTGV7 H1/hQ+DqP11OB2JcUfEmmSQU7zWwXzGUKWwdEfP1gCAGjXtq81NNGr/rJSEZAjhWbaf1Kfjnx WY3M3kEq3FTVCdyFuz3zbNGp2DsrBoZt9kVU0KEY5/gCLmIbyXERTtPFcRvoGesszQ2qXXL46 QmkyHSdsryLVPpUHbx0c0LBq13UdBTXEoOxxVRYM4r1wrOdmMETNiW4tfm3h94ocDLnDQBRyQ +/SreZX8f/giEBfg 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] [PULL 02/17] linux-user: SPARC "rd %tick" can be used by user application 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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" we have the same problem decribed in 7d6b1daedd ("linux-user, ppc: mftbl can be used by user application") for ppc in the case of sparc. When we use an application trying to resolve a name, it hangs in 0x00000000ff5dd40c: rd %tick, %o5 0x00000000ff5dd410: srlx %o5, 0x20, %o4 0x00000000ff5dd414: btst %o5, %g4 0x00000000ff5dd418: be %icc, 0xff5dd40c because %tick is staying at 0. As QEMU_CLOCK_VIRTUAL is not available in linux-user mode, simply use cpu_get_host_ticks() instead. Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180528194812.31216-1-laurent@vivier.eu> --- target/sparc/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/helper.c b/target/sparc/helper.c index 1d854890b4..46232788c8 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -67,7 +67,9 @@ uint64_t helper_tick_get_count(CPUSPARCState *env, void *opaque, int mem_idx) return cpu_tick_get_count(timer); #else - return 0; + /* In user-mode, QEMU_CLOCK_VIRTUAL doesn't exist. + Just pass through the host cpu clock ticks. */ + return cpu_get_host_ticks(); #endif } From patchwork Mon Jun 4 15:20:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925110 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 40zzXD6WlPz9s08 for ; Tue, 5 Jun 2018 01:35:08 +1000 (AEST) Received: from localhost ([::1]:40411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrVi-0005lc-HB for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:35:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHu-0002DZ-AY for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHq-00061I-Go for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:50 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:51739) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHp-0005zT-W7 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:46 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Mfwsi-1fbsNv3DkK-00N8DD; Mon, 04 Jun 2018 17:20:32 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:01 +0200 Message-Id: <20180604152015.13359-4-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:WsY/uVnNTgX/0Hm5cF8BN7odcR+VvO6Sva137KplgJ3de+S1XSd +CiIkCiUTRjHAZ1uVEaWJedQijXNLeKiJ2zb4JoyG+GKxjEvFVMnDjwB65MNiDyaE+NKcxy IpSiaTva2kRF8e2/DJ2zPdhc9xFuOg8pIhjOza7KKWyfb3xmkNS4vRSF8JV5C0JQGhaO5Iv Zf3YJj1qtls6G/L++GSYg== X-UI-Out-Filterresults: notjunk:1; V01:K0:EAynVB+wS58=:bVsAVbQC+/hQa5EjLDKsS+ zrt7OVSRBK7QrubqNre9DvI+v2Sl2NPRAosWtIRlY1DRH/dIxIs8UuPRVY2mve9XNZ7d7+pXl yM2G2Qmim9cAsBXxjKKaf7r1jmiQBPecqlttpjKgAx/2rflMp5IuWdXN/bq/LERZQkwkK5pZc aaK5NgeSCkYKXs2tyhYyTLI8A8YnxCT6YunkCZZz6piZ/7ZlGtCTbmxcJDx5/hDRIyg1z7fRW rqLrwIfIAh67Mp6YjbDKRflhU6VKTuY0v7lWQPfr1GaffOw66CHZM8D+N5GENBa9rUmc7Gpw+ zRHuaYc1fye+bO/SYNlMH9u/77uYDMnDkjyec/SGPi7JwOUTFvfpUyj/jDWFduqDbosXp2f0G uoKAmbJ2z5POefiL/G3vxV0nvSTaIiDF52+bQKdRexb6NioqU+xNGogswDL962zNMzZyH7fFR YmaIJH7oqeajwvEJdYwXkTl1sb8JU7EaQUgRg7Lg7pLdynyfN3sIX2ds3xirt0SY7V0PWUtlV wU0gsnctX4Jy3TPK+1dmTdNTdtOyzkTGq0TPxd8FMLxrdY4f9nkuw8T5tv32eU6uGrbhay4r5 LIslVeqpt6jZ9wpM7zLuJKoqzhdyyGZ44xvem4X9ciBINcFj4oRUcf6xMlgl5/69XIwtRtwaD V3r6yOtcK5393c2zWPRKBxW+2Ijkdkz2JLsr6GtJNx0pGrmCMR7vZZWO+lRtzx/s07iE= 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] [PULL 03/17] linux-user: move generic fcntl definitions to generic/fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" add a per target target_fcntl.h and include the generic one from them No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-2-laurent@vivier.eu> --- linux-user/aarch64/target_fcntl.h | 11 +++ linux-user/alpha/target_fcntl.h | 11 +++ linux-user/arm/target_fcntl.h | 11 +++ linux-user/cris/target_fcntl.h | 11 +++ linux-user/generic/fcntl.h | 151 +++++++++++++++++++++++++++++++++++ linux-user/hppa/target_fcntl.h | 11 +++ linux-user/i386/target_fcntl.h | 11 +++ linux-user/m68k/target_fcntl.h | 11 +++ linux-user/microblaze/target_fcntl.h | 11 +++ linux-user/mips/target_fcntl.h | 11 +++ linux-user/mips64/target_fcntl.h | 1 + linux-user/nios2/target_fcntl.h | 11 +++ linux-user/openrisc/target_fcntl.h | 11 +++ linux-user/ppc/target_fcntl.h | 11 +++ linux-user/riscv/target_fcntl.h | 11 +++ linux-user/s390x/target_fcntl.h | 11 +++ linux-user/sh4/target_fcntl.h | 11 +++ linux-user/sparc/target_fcntl.h | 11 +++ linux-user/sparc64/target_fcntl.h | 1 + linux-user/syscall_defs.h | 129 +----------------------------- linux-user/tilegx/target_fcntl.h | 11 +++ linux-user/x86_64/target_fcntl.h | 11 +++ linux-user/xtensa/target_fcntl.h | 11 +++ 23 files changed, 363 insertions(+), 128 deletions(-) create mode 100644 linux-user/aarch64/target_fcntl.h create mode 100644 linux-user/alpha/target_fcntl.h create mode 100644 linux-user/arm/target_fcntl.h create mode 100644 linux-user/cris/target_fcntl.h create mode 100644 linux-user/generic/fcntl.h create mode 100644 linux-user/hppa/target_fcntl.h create mode 100644 linux-user/i386/target_fcntl.h create mode 100644 linux-user/m68k/target_fcntl.h create mode 100644 linux-user/microblaze/target_fcntl.h create mode 100644 linux-user/mips/target_fcntl.h create mode 100644 linux-user/mips64/target_fcntl.h create mode 100644 linux-user/nios2/target_fcntl.h create mode 100644 linux-user/openrisc/target_fcntl.h create mode 100644 linux-user/ppc/target_fcntl.h create mode 100644 linux-user/riscv/target_fcntl.h create mode 100644 linux-user/s390x/target_fcntl.h create mode 100644 linux-user/sh4/target_fcntl.h create mode 100644 linux-user/sparc/target_fcntl.h create mode 100644 linux-user/sparc64/target_fcntl.h create mode 100644 linux-user/tilegx/target_fcntl.h create mode 100644 linux-user/x86_64/target_fcntl.h create mode 100644 linux-user/xtensa/target_fcntl.h diff --git a/linux-user/aarch64/target_fcntl.h b/linux-user/aarch64/target_fcntl.h new file mode 100644 index 0000000000..59be406280 --- /dev/null +++ b/linux-user/aarch64/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef AARCH64_TARGET_FCNTL_H +#define AARCH64_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h new file mode 100644 index 0000000000..bb603ff28c --- /dev/null +++ b/linux-user/alpha/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef ALPHA_TARGET_FCNTL_H +#define ALPHA_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/arm/target_fcntl.h b/linux-user/arm/target_fcntl.h new file mode 100644 index 0000000000..ca819df519 --- /dev/null +++ b/linux-user/arm/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef ARM_TARGET_FCNTL_H +#define ARM_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/cris/target_fcntl.h b/linux-user/cris/target_fcntl.h new file mode 100644 index 0000000000..df0aceea34 --- /dev/null +++ b/linux-user/cris/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef CRIS_TARGET_FCNTL_H +#define CRIS_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h new file mode 100644 index 0000000000..a775a491e9 --- /dev/null +++ b/linux-user/generic/fcntl.h @@ -0,0 +1,151 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef GENERIC_FCNTL_H +#define GENERIC_FCNTL_H + +/* values follow. */ +#define TARGET_O_ACCMODE 0003 +#define TARGET_O_RDONLY 00 +#define TARGET_O_WRONLY 01 +#define TARGET_O_RDWR 02 +#ifndef TARGET_O_CREAT +#define TARGET_O_CREAT 0100 /* not fcntl */ +#endif +#ifndef TARGET_O_EXCL +#define TARGET_O_EXCL 0200 /* not fcntl */ +#endif +#ifndef TARGET_O_NOCTTY +#define TARGET_O_NOCTTY 0400 /* not fcntl */ +#endif +#ifndef TARGET_O_TRUNC +#define TARGET_O_TRUNC 01000 /* not fcntl */ +#endif +#ifndef TARGET_O_APPEND +#define TARGET_O_APPEND 02000 +#endif +#ifndef TARGET_O_NONBLOCK +#define TARGET_O_NONBLOCK 04000 +#endif +#ifndef TARGET_O_DSYNC +#define TARGET_O_DSYNC 010000 +#endif +#ifndef TARGET_FASYNC +#define TARGET_FASYNC 020000 /* fcntl, for BSD compatibility */ +#endif +#ifndef TARGET_O_DIRECT +#define TARGET_O_DIRECT 040000 /* direct disk access hint */ +#endif +#ifndef TARGET_O_LARGEFILE +#define TARGET_O_LARGEFILE 0100000 +#endif +#ifndef TARGET_O_DIRECTORY +#define TARGET_O_DIRECTORY 0200000 /* must be a directory */ +#endif +#ifndef TARGET_O_NOFOLLOW +#define TARGET_O_NOFOLLOW 0400000 /* don't follow links */ +#endif +#ifndef TARGET_O_NOATIME +#define TARGET_O_NOATIME 01000000 +#endif +#ifndef TARGET_O_CLOEXEC +#define TARGET_O_CLOEXEC 02000000 +#endif +#ifndef TARGET___O_SYNC +#define TARGET___O_SYNC 04000000 +#endif +#ifndef TARGET_O_PATH +#define TARGET_O_PATH 010000000 +#endif +#ifndef TARGET___O_TMPFILE +#define TARGET___O_TMPFILE 020000000 +#endif +#ifndef TARGET_O_TMPFILE +#define TARGET_O_TMPFILE (TARGET___O_TMPFILE | TARGET_O_DIRECTORY) +#endif +#ifndef TARGET_O_NDELAY +#define TARGET_O_NDELAY TARGET_O_NONBLOCK +#endif +#ifndef TARGET_O_SYNC +#define TARGET_O_SYNC (TARGET___O_SYNC | TARGET_O_DSYNC) +#endif + +#define TARGET_F_DUPFD 0 /* dup */ +#define TARGET_F_GETFD 1 /* get close_on_exec */ +#define TARGET_F_SETFD 2 /* set/clear close_on_exec */ +#define TARGET_F_GETFL 3 /* get file->f_flags */ +#define TARGET_F_SETFL 4 /* set file->f_flags */ +#ifndef TARGET_F_GETLK +#define TARGET_F_GETLK 5 +#define TARGET_F_SETLK 6 +#define TARGET_F_SETLKW 7 +#endif +#ifndef TARGET_F_SETOWN +#define TARGET_F_SETOWN 8 /* for sockets. */ +#define TARGET_F_GETOWN 9 /* for sockets. */ +#endif +#ifndef TARGET_F_SETSIG +#define TARGET_F_SETSIG 10 /* for sockets. */ +#define TARGET_F_GETSIG 11 /* for sockets. */ +#endif + +#ifndef TARGET_F_GETLK64 +#define TARGET_F_GETLK64 12 /* using 'struct flock64' */ +#define TARGET_F_SETLK64 13 +#define TARGET_F_SETLKW64 14 +#endif + +#ifndef TARGET_F_SETOWN_EX +#define TARGET_F_SETOWN_EX 15 +#define TARGET_F_GETOWN_EX 16 +#endif + +struct target_f_owner_ex { + int type; /* Owner type of ID. */ + int pid; /* ID of owner. */ +}; + +#ifndef TARGET_F_RDLCK +#define TARGET_F_RDLCK 0 +#define TARGET_F_WRLCK 1 +#define TARGET_F_UNLCK 2 +#endif + +#ifndef TARGET_F_EXLCK +#define TARGET_F_EXLCK 4 +#define TARGET_F_SHLCK 8 +#endif + +#ifndef TARGET_ARCH_FLOCK_PAD +#define TARGET_ARCH_FLOCK_PAD +#endif + +struct target_flock { + short l_type; + short l_whence; + abi_long l_start; + abi_long l_len; +#if defined(TARGET_MIPS) + abi_long l_sysid; +#endif + int l_pid; + TARGET_ARCH_FLOCK_PAD +}; + +#ifndef TARGET_ARCH_FLOCK64_PAD +#define TARGET_ARCH_FLOCK64_PAD +#endif + +struct target_flock64 { + abi_short l_type; + abi_short l_whence; + abi_llong l_start; + abi_llong l_len; + abi_int l_pid; + TARGET_ARCH_FLOCK64_PAD +}; +#endif diff --git a/linux-user/hppa/target_fcntl.h b/linux-user/hppa/target_fcntl.h new file mode 100644 index 0000000000..aa282a5ce8 --- /dev/null +++ b/linux-user/hppa/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef HPPA_TARGET_FCNTL_H +#define HPPA_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/i386/target_fcntl.h b/linux-user/i386/target_fcntl.h new file mode 100644 index 0000000000..4819743dae --- /dev/null +++ b/linux-user/i386/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef I386_TARGET_FCNTL_H +#define I386_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/m68k/target_fcntl.h b/linux-user/m68k/target_fcntl.h new file mode 100644 index 0000000000..4328c60d22 --- /dev/null +++ b/linux-user/m68k/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef M68K_TARGET_FCNTL_H +#define M68K_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/microblaze/target_fcntl.h b/linux-user/microblaze/target_fcntl.h new file mode 100644 index 0000000000..45402275ff --- /dev/null +++ b/linux-user/microblaze/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef MICROBLAZE_TARGET_FCNTL_H +#define MICROBLAZE_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/mips/target_fcntl.h b/linux-user/mips/target_fcntl.h new file mode 100644 index 0000000000..5404245068 --- /dev/null +++ b/linux-user/mips/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef MIPS_TARGET_FCNTL_H +#define MIPS_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/mips64/target_fcntl.h b/linux-user/mips64/target_fcntl.h new file mode 100644 index 0000000000..a511bc0e6c --- /dev/null +++ b/linux-user/mips64/target_fcntl.h @@ -0,0 +1 @@ +#include "../mips/target_fcntl.h" diff --git a/linux-user/nios2/target_fcntl.h b/linux-user/nios2/target_fcntl.h new file mode 100644 index 0000000000..714583215d --- /dev/null +++ b/linux-user/nios2/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef NIOS2_TARGET_FCNTL_H +#define NIOS2_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/openrisc/target_fcntl.h b/linux-user/openrisc/target_fcntl.h new file mode 100644 index 0000000000..ea31bf8b70 --- /dev/null +++ b/linux-user/openrisc/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef OPENRISC_TARGET_FCNTL_H +#define OPENRISC_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/ppc/target_fcntl.h b/linux-user/ppc/target_fcntl.h new file mode 100644 index 0000000000..627d547289 --- /dev/null +++ b/linux-user/ppc/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef PPC_TARGET_FCNTL_H +#define PPC_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/riscv/target_fcntl.h b/linux-user/riscv/target_fcntl.h new file mode 100644 index 0000000000..9c3d0fbe2b --- /dev/null +++ b/linux-user/riscv/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef RISCV_TARGET_FCNTL_H +#define RISCV_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/s390x/target_fcntl.h b/linux-user/s390x/target_fcntl.h new file mode 100644 index 0000000000..36dc50fba0 --- /dev/null +++ b/linux-user/s390x/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef S390X_TARGET_FCNTL_H +#define S390X_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/sh4/target_fcntl.h b/linux-user/sh4/target_fcntl.h new file mode 100644 index 0000000000..2622d95539 --- /dev/null +++ b/linux-user/sh4/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef SH4_TARGET_FCNTL_H +#define SH4_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/sparc/target_fcntl.h b/linux-user/sparc/target_fcntl.h new file mode 100644 index 0000000000..35a753153b --- /dev/null +++ b/linux-user/sparc/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef SPARC_TARGET_FCNTL_H +#define SPARC_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/sparc64/target_fcntl.h b/linux-user/sparc64/target_fcntl.h new file mode 100644 index 0000000000..053c774257 --- /dev/null +++ b/linux-user/sparc64/target_fcntl.h @@ -0,0 +1 @@ +#include "../sparc/target_fcntl.h" diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index e4cd87cc00..9969f21ba1 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2407,13 +2407,6 @@ struct target_statfs64 { }; #endif - -#define TARGET_F_DUPFD 0 /* dup */ -#define TARGET_F_GETFD 1 /* get close_on_exec */ -#define TARGET_F_SETFD 2 /* set/clear close_on_exec */ -#define TARGET_F_GETFL 3 /* get file->f_flags */ -#define TARGET_F_SETFL 4 /* set file->f_flags */ - #if defined(TARGET_ALPHA) #define TARGET_F_GETLK 7 #define TARGET_F_SETLK 8 @@ -2450,34 +2443,11 @@ struct target_statfs64 { #define TARGET_F_GETLK 7 #define TARGET_F_SETLK 8 #define TARGET_F_SETLKW 9 -#else -#define TARGET_F_GETLK 5 -#define TARGET_F_SETLK 6 -#define TARGET_F_SETLKW 7 -#define TARGET_F_SETOWN 8 /* for sockets. */ -#define TARGET_F_GETOWN 9 /* for sockets. */ #endif -#define TARGET_F_SETOWN_EX 15 -#define TARGET_F_GETOWN_EX 16 - -#ifndef TARGET_F_RDLCK -#define TARGET_F_RDLCK 0 -#define TARGET_F_WRLCK 1 -#define TARGET_F_UNLCK 2 -#endif - -#ifndef TARGET_F_EXLCK -#define TARGET_F_EXLCK 4 -#define TARGET_F_SHLCK 8 -#endif - #if defined(TARGET_HPPA) #define TARGET_F_SETSIG 13 /* for sockets. */ #define TARGET_F_GETSIG 14 /* for sockets. */ -#else -#define TARGET_F_SETSIG 10 /* for sockets. */ -#define TARGET_F_GETSIG 11 /* for sockets. */ #endif #if defined(TARGET_MIPS) @@ -2488,10 +2458,6 @@ struct target_statfs64 { #define TARGET_F_GETLK64 8 /* using 'struct flock64' */ #define TARGET_F_SETLK64 9 #define TARGET_F_SETLKW64 10 -#else -#define TARGET_F_GETLK64 12 /* using 'struct flock64' */ -#define TARGET_F_SETLK64 13 -#define TARGET_F_SETLKW64 14 #endif #define TARGET_F_LINUX_SPECIFIC_BASE 1024 @@ -2577,108 +2543,15 @@ struct target_statfs64 { #define TARGET___O_TMPFILE 0x2000000 #endif -/* values follow. */ -#define TARGET_O_ACCMODE 0003 -#define TARGET_O_RDONLY 00 -#define TARGET_O_WRONLY 01 -#define TARGET_O_RDWR 02 -#ifndef TARGET_O_CREAT -#define TARGET_O_CREAT 0100 /* not fcntl */ -#endif -#ifndef TARGET_O_EXCL -#define TARGET_O_EXCL 0200 /* not fcntl */ -#endif -#ifndef TARGET_O_NOCTTY -#define TARGET_O_NOCTTY 0400 /* not fcntl */ -#endif -#ifndef TARGET_O_TRUNC -#define TARGET_O_TRUNC 01000 /* not fcntl */ -#endif -#ifndef TARGET_O_APPEND -#define TARGET_O_APPEND 02000 -#endif -#ifndef TARGET_O_NONBLOCK -#define TARGET_O_NONBLOCK 04000 -#endif -#ifndef TARGET_O_DSYNC -#define TARGET_O_DSYNC 010000 -#endif -#ifndef TARGET_FASYNC -#define TARGET_FASYNC 020000 /* fcntl, for BSD compatibility */ -#endif -#ifndef TARGET_O_DIRECT -#define TARGET_O_DIRECT 040000 /* direct disk access hint */ -#endif -#ifndef TARGET_O_LARGEFILE -#define TARGET_O_LARGEFILE 0100000 -#endif -#ifndef TARGET_O_DIRECTORY -#define TARGET_O_DIRECTORY 0200000 /* must be a directory */ -#endif -#ifndef TARGET_O_NOFOLLOW -#define TARGET_O_NOFOLLOW 0400000 /* don't follow links */ -#endif -#ifndef TARGET_O_NOATIME -#define TARGET_O_NOATIME 01000000 -#endif -#ifndef TARGET_O_CLOEXEC -#define TARGET_O_CLOEXEC 02000000 -#endif -#ifndef TARGET___O_SYNC -#define TARGET___O_SYNC 04000000 -#endif -#ifndef TARGET_O_PATH -#define TARGET_O_PATH 010000000 -#endif -#ifndef TARGET___O_TMPFILE -#define TARGET___O_TMPFILE 020000000 -#endif -#ifndef TARGET_O_TMPFILE -#define TARGET_O_TMPFILE (TARGET___O_TMPFILE | TARGET_O_DIRECTORY) -#endif -#ifndef TARGET_O_NDELAY -#define TARGET_O_NDELAY TARGET_O_NONBLOCK -#endif -#ifndef TARGET_O_SYNC -#define TARGET_O_SYNC (TARGET___O_SYNC | TARGET_O_DSYNC) -#endif - #if defined(TARGET_SPARC) #define TARGET_ARCH_FLOCK_PAD abi_short __unused; #define TARGET_ARCH_FLOCK64_PAD abi_short __unused; #elif defined(TARGET_MIPS) #define TARGET_ARCH_FLOCK_PAD abi_long pad[4]; #define TARGET_ARCH_FLOCK64_PAD -#else -#define TARGET_ARCH_FLOCK_PAD -#define TARGET_ARCH_FLOCK64_PAD -#endif - -struct target_flock { - short l_type; - short l_whence; - abi_long l_start; - abi_long l_len; -#if defined(TARGET_MIPS) - abi_long l_sysid; #endif - int l_pid; - TARGET_ARCH_FLOCK_PAD -}; -struct target_flock64 { - abi_short l_type; - abi_short l_whence; - abi_llong l_start; - abi_llong l_len; - abi_int l_pid; - TARGET_ARCH_FLOCK64_PAD -}; - -struct target_f_owner_ex { - int type; /* Owner type of ID. */ - int pid; /* ID of owner. */ -}; +#include "target_fcntl.h" /* soundcard defines */ /* XXX: convert them all to arch independent entries */ diff --git a/linux-user/tilegx/target_fcntl.h b/linux-user/tilegx/target_fcntl.h new file mode 100644 index 0000000000..5ed7438459 --- /dev/null +++ b/linux-user/tilegx/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef TILEGX_TARGET_FCNTL_H +#define TILEGX_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/x86_64/target_fcntl.h b/linux-user/x86_64/target_fcntl.h new file mode 100644 index 0000000000..3c7238e56b --- /dev/null +++ b/linux-user/x86_64/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef X86_64_TARGET_FCNTL_H +#define X86_64_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif diff --git a/linux-user/xtensa/target_fcntl.h b/linux-user/xtensa/target_fcntl.h new file mode 100644 index 0000000000..dc1ca7eaa5 --- /dev/null +++ b/linux-user/xtensa/target_fcntl.h @@ -0,0 +1,11 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef XTENSA_TARGET_FCNTL_H +#define XTENSA_TARGET_FCNTL_H +#include "../generic/fcntl.h" +#endif From patchwork Mon Jun 4 15:20:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925099 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 40zzLd52k8z9s08 for ; Tue, 5 Jun 2018 01:26:48 +1000 (AEST) Received: from localhost ([::1]:40368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrNd-0007cz-6S for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:26:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHu-0002Df-Dc for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHr-00061y-28 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:50 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:54119) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHq-00060U-Mr for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:46 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MbX2O-1fgICq375A-00IiMN; Mon, 04 Jun 2018 17:20:32 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:02 +0200 Message-Id: <20180604152015.13359-5-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:cIZQpkIH2GV10nbME7V7khoi4uiw77imuvMJvDo9yArRu6Vsl0d ISnXfy2zzAtxGaAh/3CFivRum32q8klpGZr4AOcNAzkrRmsIo/jxTuDCiqvQ0ZtkbBXiyHa Fg0ipH04KypRNrnAdcjcFL7o+uwQOW740KEdCWM/DuOgpi4qtkZ7V3351hUGhZR7quQnvRB LH7NII7vzxlptZe6grvGA== X-UI-Out-Filterresults: notjunk:1; V01:K0:MyUDIITnP4k=:Bl8PZL4Lg4V4j7UuPQM+ZM dMunxbHxU1EPFGt9ooJQsDUsv/FJ/sScp34z8Vj8LxxZRsI0qGU+b7y9jYg21tc+Py9zEfP0G SqYea1wx4fmAErTfAwLf6bJh2jDhVd4TJCzuflB4C/FoqCS4QYN5IZa/busdB166rBCwMBsxG BBSctp1GjwfWdIeHDSW7obDOk59381iQRQfyauHOZYu2fQPZy0u+TJj/70DFoP/w43bPMbP73 nCwl3f0SY049zh7cDNp2+SsfVo6jEubv2mVTuGJD5Yvtf5uR8oGuXBXPbgkV+WDt104ZJmsUB vO9T2FeadSegyXz3s4BoymFI4fjAtgM+FJdXwu5rwR34K0/552it4X1jZxd0TCENq77wd9hhi Yr43LC5TgDuXjuIkpcQL35zG4mfVDyg6EZ6yqxrojin2RtYVIlmJk1xIUTsnE4MUAVltpUSPh aJq1OY5jWwkQWdbxViVNl2jJibwU41YxPxbQCq3SkzF8x0D0MtyRpxnAG4ZQZqKnk1kvij+jn YxnXtfEqph+hX4bcrepM9CZ/RxHgX9otIsnZLwM6kc3iHIkTftWwTZJkkfmm5hXK7JRLapmJx efVYJc3lkWIWXCN2syhLxE3gBWr4zey88lBoe3lYp0NOEVNNWNZUQiNmWKU/1OmYyGaRh4e99 KC1XpyaWym0sRm1g/E1hAGe2gwcyrZ52xKm1NZmnDULEVqE62bbSk94t3FBAns+uLvrQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 Subject: [Qemu-devel] [PULL 04/17] linux-user: move alpha fcntl definitions to alpha/target_fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Acked-by: Richard Henderson Message-Id: <20180529194207.31503-3-laurent@vivier.eu> --- linux-user/alpha/target_fcntl.h | 29 +++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 32 ++------------------------------ 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h index bb603ff28c..2617e73472 100644 --- a/linux-user/alpha/target_fcntl.h +++ b/linux-user/alpha/target_fcntl.h @@ -7,5 +7,34 @@ #ifndef ALPHA_TARGET_FCNTL_H #define ALPHA_TARGET_FCNTL_H + +#define TARGET_O_NONBLOCK 04 +#define TARGET_O_APPEND 010 +#define TARGET_O_CREAT 01000 /* not fcntl */ +#define TARGET_O_TRUNC 02000 /* not fcntl */ +#define TARGET_O_EXCL 04000 /* not fcntl */ +#define TARGET_O_NOCTTY 010000 /* not fcntl */ +#define TARGET_O_DSYNC 040000 +#define TARGET_O_LARGEFILE 0 /* not necessary, always 64-bit */ +#define TARGET_O_DIRECTORY 0100000 /* must be a directory */ +#define TARGET_O_NOFOLLOW 0200000 /* don't follow links */ +#define TARGET_O_DIRECT 02000000 /* direct disk access hint */ +#define TARGET_O_NOATIME 04000000 +#define TARGET_O_CLOEXEC 010000000 +#define TARGET___O_SYNC 020000000 +#define TARGET_O_PATH 040000000 + +#define TARGET_F_GETLK 7 +#define TARGET_F_SETLK 8 +#define TARGET_F_SETLKW 9 +#define TARGET_F_SETOWN 5 /* for sockets. */ +#define TARGET_F_GETOWN 6 /* for sockets. */ + +#define TARGET_F_RDLCK 1 +#define TARGET_F_WRLCK 2 +#define TARGET_F_UNLCK 8 +#define TARGET_F_EXLCK 16 +#define TARGET_F_SHLCK 32 + #include "../generic/fcntl.h" #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 9969f21ba1..d8318ebd27 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2407,19 +2407,7 @@ struct target_statfs64 { }; #endif -#if defined(TARGET_ALPHA) -#define TARGET_F_GETLK 7 -#define TARGET_F_SETLK 8 -#define TARGET_F_SETLKW 9 -#define TARGET_F_SETOWN 5 /* for sockets. */ -#define TARGET_F_GETOWN 6 /* for sockets. */ - -#define TARGET_F_RDLCK 1 -#define TARGET_F_WRLCK 2 -#define TARGET_F_UNLCK 8 -#define TARGET_F_EXLCK 16 -#define TARGET_F_SHLCK 32 -#elif defined(TARGET_MIPS) +#if defined(TARGET_MIPS) #define TARGET_F_GETLK 14 #define TARGET_F_SETLK 6 #define TARGET_F_SETLKW 7 @@ -2468,23 +2456,7 @@ struct target_statfs64 { #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) -#if defined(TARGET_ALPHA) -#define TARGET_O_NONBLOCK 04 -#define TARGET_O_APPEND 010 -#define TARGET_O_CREAT 01000 /* not fcntl */ -#define TARGET_O_TRUNC 02000 /* not fcntl */ -#define TARGET_O_EXCL 04000 /* not fcntl */ -#define TARGET_O_NOCTTY 010000 /* not fcntl */ -#define TARGET_O_DSYNC 040000 -#define TARGET_O_LARGEFILE 0 /* not necessary, always 64-bit */ -#define TARGET_O_DIRECTORY 0100000 /* must be a directory */ -#define TARGET_O_NOFOLLOW 0200000 /* don't follow links */ -#define TARGET_O_DIRECT 02000000 /* direct disk access hint */ -#define TARGET_O_NOATIME 04000000 -#define TARGET_O_CLOEXEC 010000000 -#define TARGET___O_SYNC 020000000 -#define TARGET_O_PATH 040000000 -#elif defined(TARGET_HPPA) +#if defined(TARGET_HPPA) #define TARGET_O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */ #define TARGET_O_APPEND 000000010 #define TARGET_O_CREAT 000000400 /* not fcntl */ From patchwork Mon Jun 4 15:20: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: 925088 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 40zzHs4Pllz9s08 for ; Tue, 5 Jun 2018 01:24:25 +1000 (AEST) Received: from localhost ([::1]:40354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrLL-0004xS-6w for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:24:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHt-0002Cj-B7 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHr-00062Z-D0 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:49 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:51335) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHq-00060s-WD for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:47 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Ld8Mf-1g7kky1Ip7-00iWUA; Mon, 04 Jun 2018 17:20:33 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:03 +0200 Message-Id: <20180604152015.13359-6-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:vaQZiLJKRV5e6fa2TvIE2nOMawxb+aimtmv0d+Ak5JQ/dqsNlcH TfLvQoW40JcRVEabeFldp5Od1p1G74RF7T3f6ihb+t6WQOHrXnK73boknXleyumFOy2jSo3 isC3EpREFdjf4UiqSGlvr+JxEPUU0avQtisftcUzVcwNZhmWKJ+5l4SFVb3xiGsKoexjfC2 lZc4+GUYadfkoFv3UpFHA== X-UI-Out-Filterresults: notjunk:1; V01:K0:OmTXkail17Q=:u2FTthgcD3r+9reV+N9tQq 8xTWHq4C0rLhsonmppUBg8bYXvzRG+wo8twfinYUVozLL86h9as0671+DPhR73+4Fqpet6Cpf SYUwNjKt/CDdJdrr482Ie3hreaCiRKqoUYJ1E9pGsTKP7YhlqccZcQW4B15xfGrDlt4n3fD9W VWTensJABMsMaK4b2y1a9NfSKeGuHLUSKObZQMr1FybogDcIf4/E/vFNesQ+nmJyPtnrsIRVh PfLsHLFb92mUiqRWfQMSNYaf41wtD7aTsk4DinoVnHRPXSVOaEx9spq0cmIKPSmYUgssBIOQ5 6ayCx8hs/9CSOpoXOCNjkRhhYVRf0JFTM4UZ4FG2HdkFgt9OHc2LdkIkVL7mYEWIoYE511zVj RQhCrHx8Z2mRb+8EIe+3EyN5xxsRoHtbZBr06Ln/omDtL+UuyWqYHd9vGz8tS0s2TWwOz3kpx y9g44vQzodnSIm3LYJ7vo7i+GWOYwEnAGVRBsjZVm5CBJFoPdeaz179OfFxrj5R7e8LNYaFuS aoE9igW5iBKUvHtEINGMz2oFouiCs+ccjGQZIzy4LdmUxTzmMrJ9sA/Q5XABZ7G1r3MvHO458 1RAGbHpkm3DrX+DsOfvIVCOtE/4nnLrQx3WXUWSpoceEN+w3iUiOHOSLIg+LYiOfE+zQCEslq Vt1Q55EoLAfduXtLhSOz8pJednCDgofVgplHeoewNGphFxas+76oITlSGFGkE9aaqVA0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL 05/17] linux-user: move hppa fcntl definitions to hppa/target_fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Acked-by: Richard Henderson Message-Id: <20180529194207.31503-4-laurent@vivier.eu> --- linux-user/hppa/target_fcntl.h | 31 +++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 34 +--------------------------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/linux-user/hppa/target_fcntl.h b/linux-user/hppa/target_fcntl.h index aa282a5ce8..bd966a59b8 100644 --- a/linux-user/hppa/target_fcntl.h +++ b/linux-user/hppa/target_fcntl.h @@ -7,5 +7,36 @@ #ifndef HPPA_TARGET_FCNTL_H #define HPPA_TARGET_FCNTL_H + +#define TARGET_O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */ +#define TARGET_O_APPEND 000000010 +#define TARGET_O_CREAT 000000400 /* not fcntl */ +#define TARGET_O_EXCL 000002000 /* not fcntl */ +#define TARGET_O_NOCTTY 000400000 /* not fcntl */ +#define TARGET_O_DSYNC 001000000 +#define TARGET_O_LARGEFILE 000004000 +#define TARGET_O_DIRECTORY 000010000 /* must be a directory */ +#define TARGET_O_NOFOLLOW 000000200 /* don't follow links */ +#define TARGET_O_NOATIME 004000000 +#define TARGET_O_CLOEXEC 010000000 +#define TARGET___O_SYNC 000100000 +#define TARGET_O_PATH 020000000 + +#define TARGET_F_RDLCK 1 +#define TARGET_F_WRLCK 2 +#define TARGET_F_UNLCK 3 + +#define TARGET_F_GETLK64 8 /* using 'struct flock64' */ +#define TARGET_F_SETLK64 9 +#define TARGET_F_SETLKW64 10 + +#define TARGET_F_GETLK 5 +#define TARGET_F_SETLK 6 +#define TARGET_F_SETLKW 7 +#define TARGET_F_GETOWN 11 /* for sockets. */ +#define TARGET_F_SETOWN 12 /* for sockets. */ +#define TARGET_F_SETSIG 13 /* for sockets. */ +#define TARGET_F_GETSIG 14 /* for sockets. */ + #include "../generic/fcntl.h" #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index d8318ebd27..46d2353254 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2413,15 +2413,6 @@ struct target_statfs64 { #define TARGET_F_SETLKW 7 #define TARGET_F_SETOWN 24 /* for sockets. */ #define TARGET_F_GETOWN 23 /* for sockets. */ -#elif defined(TARGET_HPPA) -#define TARGET_F_RDLCK 1 -#define TARGET_F_WRLCK 2 -#define TARGET_F_UNLCK 3 -#define TARGET_F_GETLK 5 -#define TARGET_F_SETLK 6 -#define TARGET_F_SETLKW 7 -#define TARGET_F_GETOWN 11 /* for sockets. */ -#define TARGET_F_SETOWN 12 /* for sockets. */ #elif defined(TARGET_SPARC) #define TARGET_F_RDLCK 1 #define TARGET_F_WRLCK 2 @@ -2433,19 +2424,10 @@ struct target_statfs64 { #define TARGET_F_SETLKW 9 #endif -#if defined(TARGET_HPPA) -#define TARGET_F_SETSIG 13 /* for sockets. */ -#define TARGET_F_GETSIG 14 /* for sockets. */ -#endif - #if defined(TARGET_MIPS) #define TARGET_F_GETLK64 33 /* using 'struct flock64' */ #define TARGET_F_SETLK64 34 #define TARGET_F_SETLKW64 35 -#elif defined(TARGET_HPPA) -#define TARGET_F_GETLK64 8 /* using 'struct flock64' */ -#define TARGET_F_SETLK64 9 -#define TARGET_F_SETLKW64 10 #endif #define TARGET_F_LINUX_SPECIFIC_BASE 1024 @@ -2456,21 +2438,7 @@ struct target_statfs64 { #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) -#if defined(TARGET_HPPA) -#define TARGET_O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */ -#define TARGET_O_APPEND 000000010 -#define TARGET_O_CREAT 000000400 /* not fcntl */ -#define TARGET_O_EXCL 000002000 /* not fcntl */ -#define TARGET_O_NOCTTY 000400000 /* not fcntl */ -#define TARGET_O_DSYNC 001000000 -#define TARGET_O_LARGEFILE 000004000 -#define TARGET_O_DIRECTORY 000010000 /* must be a directory */ -#define TARGET_O_NOFOLLOW 000000200 /* don't follow links */ -#define TARGET_O_NOATIME 004000000 -#define TARGET_O_CLOEXEC 010000000 -#define TARGET___O_SYNC 000100000 -#define TARGET_O_PATH 020000000 -#elif defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_AARCH64) +#if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_AARCH64) #define TARGET_O_DIRECTORY 040000 /* must be a directory */ #define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ #define TARGET_O_DIRECT 0200000 /* direct disk access hint */ From patchwork Mon Jun 4 15:20:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925084 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 40zzDb2FGdz9s0w for ; Tue, 5 Jun 2018 01:21:35 +1000 (AEST) Received: from localhost ([::1]:40339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrIa-0002Db-SD for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:21:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHq-0002AV-Kq for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHn-0005xN-Ax for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:46 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:50871) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHn-0005wI-0z for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:43 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Ll4qI-1fyeL13jao-00b4Dx; Mon, 04 Jun 2018 17:20:34 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:04 +0200 Message-Id: <20180604152015.13359-7-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:Hefk/Mr4g0zRhvYoR+BqHYcgMXgI3LCQOB7ApBo6ifxxhYfr3cX BGWwz7dSxD/piABvx1D5Nuy1FDdzYphUdOSD/APkEREDFiywnvyBNyirdNuZPIUkLVaPKVy BTx9X/lEbDQCaPbbD3mZS/dFF9Iao28tEuqpwllv5vL/zsyG6iCItd6hTvZzOAxNUAJXcRW /YsKPAFZYshy6Op+eysjA== X-UI-Out-Filterresults: notjunk:1; V01:K0:yarID3k5gIM=:LW3RAskqUK7ddN1VekpLvX QguHvlA0Ypx/33EUrMoYFW7WmLLX4ibPDPupQa1BZjM4yv4NpQzQjejwa/wmVBlcN2h5C5mnV rLcBcq0/H1mp/Icid6TpSXfv84Q62uoeUAt+HJTH64CG3nRPFo4twNnMxCDxPckurcdLDOfvf Rw4a8H0VizKBbL0FRHZInVgSN9ZIBFF6hjE7TcTrDddusB5WJXtLAgHT/fKnesV3wGD9dR2jL hSQMDN9J6angSclH52HIfXJzVQJck4HdmALVergT5EWWF1dWqygoTmb7wBgXHQdpgv9VZTEi6 zCSjhn9ykILyTsVYfLqflvGrJKbr8OL9WVqtJuVsa/yVhT0IqqLK2vWMyc/S/NTVxLcGCE3Dv 5K6S5j/Qn3qZV2Dq+ypeqkYhIz1GUgrzu8jGSrov9SIUItQYNn3SNPrnI+5++NXroymwIcJhU Vync1I6WtFgA605TIyZTYS+ki3nQ4iMlyYzSOd1JS2pM4/Dqm6ql6oPQpRR/ao8TWWRb8TLvG hegKbzQNV9pNq88ADPILyzYWF+YHsXIjcbZLBr5FwsCZfGPKBiziyPsNMw8xZjqQqlPqJ0Mme UJ+pXBXsikCzRWm/I1v4jlVqvkTYPZSkSGZwd2+F8hSnS3bh9E4EKXLYAyqwqVnoj/mL902Vl pbFmszwTUmnfHrf77/tI03f+pX3VPlnyE53MT1hDQzTxSHrJL/EEtVO0+rK59tnnQ7rk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PULL 06/17] linux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Acked-by: Richard Henderson Message-Id: <20180529194207.31503-5-laurent@vivier.eu> --- linux-user/aarch64/target_fcntl.h | 5 +++++ linux-user/arm/target_fcntl.h | 6 ++++++ linux-user/m68k/target_fcntl.h | 6 ++++++ linux-user/syscall_defs.h | 7 +------ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/linux-user/aarch64/target_fcntl.h b/linux-user/aarch64/target_fcntl.h index 59be406280..efdf6e5f05 100644 --- a/linux-user/aarch64/target_fcntl.h +++ b/linux-user/aarch64/target_fcntl.h @@ -7,5 +7,10 @@ #ifndef AARCH64_TARGET_FCNTL_H #define AARCH64_TARGET_FCNTL_H + +#define TARGET_O_DIRECTORY 040000 /* must be a directory */ +#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ +#define TARGET_O_DIRECT 0200000 /* direct disk access hint */ + #include "../generic/fcntl.h" #endif diff --git a/linux-user/arm/target_fcntl.h b/linux-user/arm/target_fcntl.h index ca819df519..c8ff6b2505 100644 --- a/linux-user/arm/target_fcntl.h +++ b/linux-user/arm/target_fcntl.h @@ -7,5 +7,11 @@ #ifndef ARM_TARGET_FCNTL_H #define ARM_TARGET_FCNTL_H + +#define TARGET_O_DIRECTORY 040000 /* must be a directory */ +#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ +#define TARGET_O_DIRECT 0200000 /* direct disk access hint */ +#define TARGET_O_LARGEFILE 0400000 + #include "../generic/fcntl.h" #endif diff --git a/linux-user/m68k/target_fcntl.h b/linux-user/m68k/target_fcntl.h index 4328c60d22..068bc3243e 100644 --- a/linux-user/m68k/target_fcntl.h +++ b/linux-user/m68k/target_fcntl.h @@ -7,5 +7,11 @@ #ifndef M68K_TARGET_FCNTL_H #define M68K_TARGET_FCNTL_H + +#define TARGET_O_DIRECTORY 040000 /* must be a directory */ +#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ +#define TARGET_O_DIRECT 0200000 /* direct disk access hint */ +#define TARGET_O_LARGEFILE 0400000 + #include "../generic/fcntl.h" #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 46d2353254..3d13cdd654 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2438,12 +2438,7 @@ struct target_statfs64 { #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) -#if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_AARCH64) -#define TARGET_O_DIRECTORY 040000 /* must be a directory */ -#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ -#define TARGET_O_DIRECT 0200000 /* direct disk access hint */ -#define TARGET_O_LARGEFILE 0400000 -#elif defined(TARGET_MIPS) +#if defined(TARGET_MIPS) #define TARGET_O_APPEND 0x0008 #define TARGET_O_DSYNC 0x0010 #define TARGET_O_NONBLOCK 0x0080 From patchwork Mon Jun 4 15:20:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925082 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 40zzDZ6xYfz9s08 for ; Tue, 5 Jun 2018 01:21:34 +1000 (AEST) Received: from localhost ([::1]:40338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrIa-0002Cy-K8 for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:21:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHq-0002AU-K5 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHp-0005zg-B1 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:46 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:56827) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHp-0005xy-0y for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:45 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MMLX7-1fMGOF1vcD-0084CQ; Mon, 04 Jun 2018 17:20:34 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:05 +0200 Message-Id: <20180604152015.13359-8-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:M6JqOhCgizjQOotqfqKEmJMYu311221ywtoX0pJvzEj9C8UGa9m BWVZ4RSUk2FbdaerttHi7OjwsEOw781d1FqXOdZd7QFKCuKOkob3fysclLrFg0RR3IyzSx3 GHlzPWdRxHA+ueNRgooQDDt45568aO0BQSKQ77xI5gA3RggurKUrdWsEDt6KIB1X/8+0eGG sDM0DKJ13lbLHbogT8x9Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:M2Dv9WyZAoI=:moPT4q1h91/9wMQU03UOu9 JttZUJADvkDxtiUItZfurXi0G/R52vDl1HKR1dJth1ligRaP+uMqtgZq8YtB2o3L11P8aW0rD j7XexFEhkE0brMEeHq/3KP94Pkyc1IvZuhLJHzPvOgJrHhdN9VjWKbsVYUqZVEhTCHCp/zoXM K3x4LjRI/IK4sCA0ec3iQhrHbGeQzwUmTqyzfE7dykqkvdn6fZfZY4N1V+AUjp27IRNC0luh3 Xr/in5V09RgWKaeU6MXrwMZNvz36dN+C8yEwprcKE3obWZahBTIxN0mFAsKFJZPWUsQprw2sl unBhG14xYSQonC4N4Fxo1WZACZk5/VcjLYMQVxqxQg1nxj2thlLW2GWw+vR4J90Z4rzAQdZd1 vvDSGHX34yLiw0A31hIw+1QcW5C9pBcOhde6gx9i3CDap2cYlgVjSHJpzEPX/qjm34DmID6Gv JwieA2LPWil26a1y2qROOJSkEFx6jU5oq63PcHihlyfnqJ7PEgo/51ZHc2ZHAnIzdWWnYFpK1 2EKAoedWog17Z+3YGrkWezZLR7A7zJEhP4Op6idWi2aVkdT/2jWK3Jj+56eYs9RwT0AsIiVXy 5vEB4IuS5LN7AZ0v3kbvcJpH1G3B9BM083uIxpP+d+vOOGo1yT8JKrzc/Zd9IJFw3VBo9oT/P Hv9AIYr4kD+NmE3RB6EFe03Iixz7BTHVpTDI60omfy5XtYKtxSuRtsLxQS1lxRgbrJ0o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PULL 07/17] linux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-6-laurent@vivier.eu> --- linux-user/mips/target_fcntl.h | 27 +++++++++++++++++++++++++++ linux-user/syscall_defs.h | 31 ++----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/linux-user/mips/target_fcntl.h b/linux-user/mips/target_fcntl.h index 5404245068..000527cc95 100644 --- a/linux-user/mips/target_fcntl.h +++ b/linux-user/mips/target_fcntl.h @@ -7,5 +7,32 @@ #ifndef MIPS_TARGET_FCNTL_H #define MIPS_TARGET_FCNTL_H + +#define TARGET_O_APPEND 0x0008 +#define TARGET_O_DSYNC 0x0010 +#define TARGET_O_NONBLOCK 0x0080 +#define TARGET_O_CREAT 0x0100 /* not fcntl */ +#define TARGET_O_TRUNC 0x0200 /* not fcntl */ +#define TARGET_O_EXCL 0x0400 /* not fcntl */ +#define TARGET_O_NOCTTY 0x0800 /* not fcntl */ +#define TARGET_FASYNC 0x1000 /* fcntl, for BSD compatibility */ +#define TARGET_O_LARGEFILE 0x2000 /* allow large file opens */ +#define TARGET___O_SYNC 0x4000 +#define TARGET_O_DIRECT 0x8000 /* direct disk access hint */ + +#define TARGET_F_GETLK 14 +#define TARGET_F_SETLK 6 +#define TARGET_F_SETLKW 7 + +#define TARGET_F_SETOWN 24 /* for sockets. */ +#define TARGET_F_GETOWN 23 /* for sockets. */ + +#define TARGET_ARCH_FLOCK_PAD abi_long pad[4]; +#define TARGET_ARCH_FLOCK64_PAD + +#define TARGET_F_GETLK64 33 /* using 'struct flock64' */ +#define TARGET_F_SETLK64 34 +#define TARGET_F_SETLKW64 35 + #include "../generic/fcntl.h" #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 3d13cdd654..44a590d2c9 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2407,13 +2407,7 @@ struct target_statfs64 { }; #endif -#if defined(TARGET_MIPS) -#define TARGET_F_GETLK 14 -#define TARGET_F_SETLK 6 -#define TARGET_F_SETLKW 7 -#define TARGET_F_SETOWN 24 /* for sockets. */ -#define TARGET_F_GETOWN 23 /* for sockets. */ -#elif defined(TARGET_SPARC) +#if defined(TARGET_SPARC) #define TARGET_F_RDLCK 1 #define TARGET_F_WRLCK 2 #define TARGET_F_UNLCK 3 @@ -2424,12 +2418,6 @@ struct target_statfs64 { #define TARGET_F_SETLKW 9 #endif -#if defined(TARGET_MIPS) -#define TARGET_F_GETLK64 33 /* using 'struct flock64' */ -#define TARGET_F_SETLK64 34 -#define TARGET_F_SETLKW64 35 -#endif - #define TARGET_F_LINUX_SPECIFIC_BASE 1024 #define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0) #define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1) @@ -2438,19 +2426,7 @@ struct target_statfs64 { #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) -#if defined(TARGET_MIPS) -#define TARGET_O_APPEND 0x0008 -#define TARGET_O_DSYNC 0x0010 -#define TARGET_O_NONBLOCK 0x0080 -#define TARGET_O_CREAT 0x0100 /* not fcntl */ -#define TARGET_O_TRUNC 0x0200 /* not fcntl */ -#define TARGET_O_EXCL 0x0400 /* not fcntl */ -#define TARGET_O_NOCTTY 0x0800 /* not fcntl */ -#define TARGET_FASYNC 0x1000 /* fcntl, for BSD compatibility */ -#define TARGET_O_LARGEFILE 0x2000 /* allow large file opens */ -#define TARGET___O_SYNC 0x4000 -#define TARGET_O_DIRECT 0x8000 /* direct disk access hint */ -#elif defined (TARGET_PPC) +#if defined (TARGET_PPC) #define TARGET_O_DIRECTORY 040000 /* must be a directory */ #define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ #define TARGET_O_LARGEFILE 0200000 @@ -2481,9 +2457,6 @@ struct target_statfs64 { #if defined(TARGET_SPARC) #define TARGET_ARCH_FLOCK_PAD abi_short __unused; #define TARGET_ARCH_FLOCK64_PAD abi_short __unused; -#elif defined(TARGET_MIPS) -#define TARGET_ARCH_FLOCK_PAD abi_long pad[4]; -#define TARGET_ARCH_FLOCK64_PAD #endif #include "target_fcntl.h" From patchwork Mon Jun 4 15:20:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925103 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 40zzP9619Lz9s0w for ; Tue, 5 Jun 2018 01:29:01 +1000 (AEST) Received: from localhost ([::1]:40379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrPn-0000zG-Dc for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:28:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHw-0002Fp-C8 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHt-00064U-1c for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:38381) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHs-000634-Oa for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:48 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LfLHp-1g5Wm20BVB-00p8C6; Mon, 04 Jun 2018 17:20:35 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:06 +0200 Message-Id: <20180604152015.13359-9-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:aEPF7CYnF97Dr0M1chGcxiSItSDOkGVw7B7R9my+lvK7yGBGVmF 1l5fFuxawerzUf6Sbja1+4R/IjCdNbFRZtDVqZ92FmvzvfO/Lyq3AczFo2pjXW1zJ1mtAb1 DidRJlgs63xIdQ/a5G7BTsnqWGbHeaC+VNy/lp80TGlnk6lLhd7r7+hel22pAp4TSG2ieVJ ebqmvip2dLtOfROfo8tPA== X-UI-Out-Filterresults: notjunk:1; V01:K0:cLlnJl87TZQ=:O6SPVt/rEV7A8TWaxORTYF GvD8Tx+SJZj7mzDfWBJW5/QIg9tyN3Lk6pvaQvAg70qM0R/eNUes9dU/L/dmJro8Tvvgdct8g 6MAgkQypIIPiAwjtd4g29YbxIESw91WDpvFs1aghnyHJ+s0SAUSFs8TPwZV575ss5AawcnsYo 5UtilFCD+eVkJ10p3bYdO6RvtPkPpxOGQhx0nA3JBEd0CtD/iBEvOYpRhF4gddxqJzXZxyBnt b1t6i7Cur9hAmMrihGYfoX1lI5IWthTAXIvnrdQ11yxpFw38pmENfOXW5ca+LiWZMrf0RFIeC Ost8ZSieIr9bG9Ih7HabkJKn+gjKyZboL7J8XDIjJOGrFieyU67fvsEZGpjx4KPD4w4dKXHhR yzUGMzNU0lRjXg2pT/vYQmY3tJXYhLBiRmvQlYnlwDq1aesJsTzDN8GuoiJlyg/NkKN73f6hH sb6TwTgzuIJxIzdDUzQepO2ZLytxGZQ2GVi6l3dA5bf2/htSi8/1MKY+1U54m1UdCf9q6paJJ UjMfoyUPPottyQsYBVGQ0pkIH+coiQ465NhWNg5qhkWtZpAv4v3qp1zAe/b0iGXuQdtkONOhn dXzvWWrD3aXDUdb5w1twVra8CxyLwEqNPTnchftTRqVGELhQQVl37gex96eAstmGfuFEvg1JE aHpQ8zK/J2lZkFma6ET4ND2TevjkF6OvoS7NZGsAJjVJyaGUt71bm8rbncz7OZXVp6y8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 Subject: [Qemu-devel] [PULL 08/17] linux-user: move ppc fcntl definitions to ppc/target_fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-7-laurent@vivier.eu> --- linux-user/ppc/target_fcntl.h | 6 ++++++ linux-user/syscall_defs.h | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/linux-user/ppc/target_fcntl.h b/linux-user/ppc/target_fcntl.h index 627d547289..d74ab710cf 100644 --- a/linux-user/ppc/target_fcntl.h +++ b/linux-user/ppc/target_fcntl.h @@ -7,5 +7,11 @@ #ifndef PPC_TARGET_FCNTL_H #define PPC_TARGET_FCNTL_H + +#define TARGET_O_DIRECTORY 040000 /* must be a directory */ +#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ +#define TARGET_O_LARGEFILE 0200000 +#define TARGET_O_DIRECT 0400000 /* direct disk access hint */ + #include "../generic/fcntl.h" #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 44a590d2c9..a434edadf8 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2426,12 +2426,7 @@ struct target_statfs64 { #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) -#if defined (TARGET_PPC) -#define TARGET_O_DIRECTORY 040000 /* must be a directory */ -#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ -#define TARGET_O_LARGEFILE 0200000 -#define TARGET_O_DIRECT 0400000 /* direct disk access hint */ -#elif defined (TARGET_SPARC) +#if defined (TARGET_SPARC) #define TARGET_O_APPEND 0x0008 #define TARGET_FASYNC 0x0040 /* fcntl, for BSD compatibility */ #define TARGET_O_CREAT 0x0200 /* not fcntl */ From patchwork Mon Jun 4 15:20:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925086 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 40zzHh3DKKz9s0w for ; Tue, 5 Jun 2018 01:24:16 +1000 (AEST) Received: from localhost ([::1]:40348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrLC-0004kZ-3s for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:24:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHq-0002AS-Jv for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHo-0005y9-7L for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:46 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:60067) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHn-0005xE-TP for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:44 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LaeSa-1gADbH2ZD6-00kRMN; Mon, 04 Jun 2018 17:20:35 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:07 +0200 Message-Id: <20180604152015.13359-10-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:MXCpqn3z7vbAl5lYmmWA6vpPjqxUoIZZdH9oRIuR9YqqkYrlPXh Yrl+MMQ2pqvyw6m3h91YhUOypHgluJgRSLZ+EfiV6D+iuy00wjmaMC8KTdWQ9/rkYU2MvJJ HTT1aTL5ymM/CmgGmhbKtY4zxhsJ/foHjrr9sth/55nP/qGll4eS+uket4as5IHzRwwKQwU 5XERCqDVv89WOj/XOVgng== X-UI-Out-Filterresults: notjunk:1; V01:K0:04YATpeZTBE=:P2F5cvhJBu4/1idPrXog0r uxaO2IiXtRjdJpSay+3V6g+2udhEY2eowBZKPnNL25oV+Pc58ikkEleiIpRnTfMOu6rs/dvuB mxWIBejHPWMv927tGDlCVtmngdwP7gfgdSg+qBDqlxFqfQdkitKxWjaNch2HTTM6fSrP2OUFo j+GFDihQw1GSttD5xi5gTxUCk6xkfdMHTM2csfVU5T8QEWz0GqPFi7YnCyS7yt/A8wROyTy0j 4T3PGBMnmL1TYpJQuzgxbZNBeL0rFuXO2A9heZ+vSp+5IGSLjiKBuXQ3WdNwIL0r0gD5d9Oz9 sYTbMmX+UQ48c6swbPVbPz+bBIn/ekGDoRd0i3lDgQadEDimU00fnyFv1AQvR6yeHywS7cH1U MUK82EK0M0QOrmuOPX33lNfbmhzB0G/7fwpCTHJqRNiTLDZJzbVrWdYo1aI6LieMsOaaQ5TcF 9PJWTKvbOaTITcpXmdOR9wTVHQ/0pTb8vrco3Qi9B9R2IFXFQRCCOtT8F3rHArEw9vODJuWls SlFr1wNoJAZqb80iDOVgBreVOKY8TdyRLrn8CdZulCiuRsR1PpdKKLz+ma6eEYkN5t6qNZQvv F/5aUD0liLPFDKMlPfbzzvY6hI3iraiWOWMKJ4VZH2nYd6JvmAeFJJo2y2VZOFtygr8mFFzfQ M0IfWhR8jyb5dDx1zlfVfPQJPsYQyFjvxU7zSJySky7UZhaHltzSXgvUXDGPxCV86+MQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PULL 09/17] linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-8-laurent@vivier.eu> --- linux-user/sparc/target_fcntl.h | 34 ++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 39 --------------------------------------- 2 files changed, 34 insertions(+), 39 deletions(-) diff --git a/linux-user/sparc/target_fcntl.h b/linux-user/sparc/target_fcntl.h index 35a753153b..c2532989e5 100644 --- a/linux-user/sparc/target_fcntl.h +++ b/linux-user/sparc/target_fcntl.h @@ -7,5 +7,39 @@ #ifndef SPARC_TARGET_FCNTL_H #define SPARC_TARGET_FCNTL_H + +#define TARGET_O_APPEND 0x0008 +#define TARGET_FASYNC 0x0040 /* fcntl, for BSD compatibility */ +#define TARGET_O_CREAT 0x0200 /* not fcntl */ +#define TARGET_O_TRUNC 0x0400 /* not fcntl */ +#define TARGET_O_EXCL 0x0800 /* not fcntl */ +#define TARGET_O_DSYNC 0x2000 +#define TARGET_O_NONBLOCK 0x4000 +# ifdef TARGET_SPARC64 +# define TARGET_O_NDELAY 0x0004 +# else +# define TARGET_O_NDELAY (0x0004 | TARGET_O_NONBLOCK) +# endif +#define TARGET_O_NOCTTY 0x8000 /* not fcntl */ +#define TARGET_O_LARGEFILE 0x40000 +#define TARGET_O_DIRECT 0x100000 /* direct disk access hint */ +#define TARGET_O_NOATIME 0x200000 +#define TARGET_O_CLOEXEC 0x400000 +#define TARGET___O_SYNC 0x800000 +#define TARGET_O_PATH 0x1000000 +#define TARGET___O_TMPFILE 0x2000000 + +#define TARGET_F_RDLCK 1 +#define TARGET_F_WRLCK 2 +#define TARGET_F_UNLCK 3 +#define TARGET_F_GETOWN 5 /* for sockets. */ +#define TARGET_F_SETOWN 6 /* for sockets. */ +#define TARGET_F_GETLK 7 +#define TARGET_F_SETLK 8 +#define TARGET_F_SETLKW 9 + +#define TARGET_ARCH_FLOCK_PAD abi_short __unused; +#define TARGET_ARCH_FLOCK64_PAD abi_short __unused; + #include "../generic/fcntl.h" #endif diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a434edadf8..fbf1bf995a 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2407,17 +2407,6 @@ struct target_statfs64 { }; #endif -#if defined(TARGET_SPARC) -#define TARGET_F_RDLCK 1 -#define TARGET_F_WRLCK 2 -#define TARGET_F_UNLCK 3 -#define TARGET_F_GETOWN 5 /* for sockets. */ -#define TARGET_F_SETOWN 6 /* for sockets. */ -#define TARGET_F_GETLK 7 -#define TARGET_F_SETLK 8 -#define TARGET_F_SETLKW 9 -#endif - #define TARGET_F_LINUX_SPECIFIC_BASE 1024 #define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0) #define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1) @@ -2426,34 +2415,6 @@ struct target_statfs64 { #define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8) #define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2) -#if defined (TARGET_SPARC) -#define TARGET_O_APPEND 0x0008 -#define TARGET_FASYNC 0x0040 /* fcntl, for BSD compatibility */ -#define TARGET_O_CREAT 0x0200 /* not fcntl */ -#define TARGET_O_TRUNC 0x0400 /* not fcntl */ -#define TARGET_O_EXCL 0x0800 /* not fcntl */ -#define TARGET_O_DSYNC 0x2000 -#define TARGET_O_NONBLOCK 0x4000 -# ifdef TARGET_SPARC64 -# define TARGET_O_NDELAY 0x0004 -# else -# define TARGET_O_NDELAY (0x0004 | TARGET_O_NONBLOCK) -# endif -#define TARGET_O_NOCTTY 0x8000 /* not fcntl */ -#define TARGET_O_LARGEFILE 0x40000 -#define TARGET_O_DIRECT 0x100000 /* direct disk access hint */ -#define TARGET_O_NOATIME 0x200000 -#define TARGET_O_CLOEXEC 0x400000 -#define TARGET___O_SYNC 0x800000 -#define TARGET_O_PATH 0x1000000 -#define TARGET___O_TMPFILE 0x2000000 -#endif - -#if defined(TARGET_SPARC) -#define TARGET_ARCH_FLOCK_PAD abi_short __unused; -#define TARGET_ARCH_FLOCK64_PAD abi_short __unused; -#endif - #include "target_fcntl.h" /* soundcard defines */ From patchwork Mon Jun 4 15:20:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925111 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 40zzXV1s2pz9s08 for ; Tue, 5 Jun 2018 01:35:22 +1000 (AEST) Received: from localhost ([::1]:40413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrVv-0005yl-QL for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:35:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHz-0002Gz-9S for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHv-00068N-59 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:55 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:51297) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHu-00065Z-K3 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:51 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MSlc0-1fp7uS0nuG-00RY43; Mon, 04 Jun 2018 17:20:37 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:08 +0200 Message-Id: <20180604152015.13359-11-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:K9IgsiroSrdQ7j9sxyWxeApDcM3AeW6A2hNGt9qc9PF/t5OrsT0 fk5e/miM4Q9cGnGCG+Crb5U2RM8IhHsFqURXHBuVXfFDvZsh7uvajh0hrKHRy/JItssqK/R mle7Pw8FT3V3JNH4H6BSlBIz+W2eqb4Y/YhGosnwVwARnw/iY14RPStCuo4v63kiBEYjQKE vqvKrPL14TKP+4wxUWbug== X-UI-Out-Filterresults: notjunk:1; V01:K0:F+wH65pYbTo=:qse9VlYmsG2+Nm2r2lxSSt +xS5uAA9GXWS87e4pqRlXpGKBSSrpHQcr6ViNhMQT884Q1ygBm4TeuROXOTWZVSxzceFKaeSH o6imfl1Y9lg5IppUSVwvo0pUzwlRqht0WJY41S5bmJQdRhbAPNezq/K0PJtyUH1gu/XEdVrXz IzaWHcwkdhxYscYXXe3HXM+trmvl+gQ3Grlx+QkOPq+oT6MH/ZT3+HuHJ8kydblH8cmmOEKtN qDDvP+LOc60PoIoXwtSBZpZp9KQ60G+X/afZI5RQfNHiwAO8sptthkKDYlCcsjgxkK2uejnuf 0VyvpcERIGIA5Mp1sA9tk1Mjqb7GV5BwBfV5X8KWgvQlmq3d1eRxrRBXCOrXl6mOYd6mgEKrV Br3TwbY6URUac0oFxd+RpGUzjQpJnumRKGG8sbxpRJUGworpWc9LSjLijerDGGZjXzFQKhU87 zNVukBaWI73sPQduCtHGwbK28JcyTxb/CJAGM/IH/7dkHI1Ffk/P2PGY1UdWg6obBbpF9UlqD vdXvO3zULe/xaHRo9W59y/TdNMnqcj45xRIrtg1S02fmDENEfJN392WSacv6euMatS1UFlWpq /zYCSwM6rqE+pjgUx8NtxRzFwI7B6Pjlyg8d7gb0fy1IEI8jceSvDOylWvT9/aqOAGIjkbSlu XhHBUNeZCfoGrTuLmWKQ7Ui8C1DywekxtuFrhgqnQa/WJzbFWBpiGhcKJYqc6DWvJHd4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 Subject: [Qemu-devel] [PULL 10/17] linux-user: move get_sp_from_cpustate() to target_cpu.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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Remove useless includes Fix HPPA include guard. Signed-off-by: Laurent Vivier Acked-by: Richard Henderson Message-Id: <20180529194207.31503-9-laurent@vivier.eu> --- linux-user/aarch64/signal.c | 1 - linux-user/aarch64/target_cpu.h | 4 ++++ linux-user/aarch64/target_signal.h | 7 ------- linux-user/alpha/signal.c | 1 - linux-user/alpha/target_cpu.h | 4 ++++ linux-user/alpha/target_signal.h | 8 -------- linux-user/arm/signal.c | 1 - linux-user/arm/target_cpu.h | 4 ++++ linux-user/arm/target_signal.h | 7 ------- linux-user/cris/signal.c | 1 - linux-user/cris/target_cpu.h | 4 ++++ linux-user/cris/target_signal.h | 7 ------- linux-user/hppa/signal.c | 1 - linux-user/hppa/target_cpu.h | 8 ++++++-- linux-user/hppa/target_signal.h | 6 ------ linux-user/i386/signal.c | 1 - linux-user/i386/target_cpu.h | 4 ++++ linux-user/i386/target_signal.h | 7 ------- linux-user/m68k/signal.c | 1 - linux-user/m68k/target_cpu.h | 4 ++++ linux-user/m68k/target_signal.h | 7 ------- linux-user/microblaze/signal.c | 1 - linux-user/microblaze/target_cpu.h | 4 ++++ linux-user/microblaze/target_signal.h | 7 ------- linux-user/mips/signal.c | 1 - linux-user/mips/target_cpu.h | 4 ++++ linux-user/mips/target_signal.h | 7 ------- linux-user/mips64/target_signal.h | 6 ------ linux-user/nios2/signal.c | 1 - linux-user/nios2/target_cpu.h | 4 ++++ linux-user/nios2/target_signal.h | 6 ------ linux-user/openrisc/signal.c | 1 - linux-user/openrisc/target_cpu.h | 4 ++++ linux-user/openrisc/target_signal.h | 6 ------ linux-user/ppc/signal.c | 1 - linux-user/ppc/target_cpu.h | 5 ++++- linux-user/ppc/target_signal.h | 7 ------- linux-user/qemu.h | 1 - linux-user/riscv/signal.c | 1 - linux-user/riscv/target_cpu.h | 4 ++++ linux-user/riscv/target_signal.h | 6 ------ linux-user/s390x/signal.c | 1 - linux-user/s390x/target_cpu.h | 4 ++++ linux-user/s390x/target_signal.h | 7 ------- linux-user/sh4/signal.c | 1 - linux-user/sh4/target_cpu.h | 4 ++++ linux-user/sh4/target_signal.h | 7 ------- linux-user/signal.c | 1 - linux-user/sparc/signal.c | 1 - linux-user/sparc/target_cpu.h | 11 +++++++++++ linux-user/sparc/target_signal.h | 14 -------------- linux-user/sparc64/target_signal.h | 14 -------------- linux-user/syscall_defs.h | 2 ++ linux-user/tilegx/signal.c | 1 - linux-user/tilegx/target_cpu.h | 4 ++++ linux-user/tilegx/target_signal.h | 6 ------ linux-user/x86_64/target_signal.h | 6 ------ linux-user/xtensa/signal.c | 1 - linux-user/xtensa/target_cpu.h | 4 ++++ linux-user/xtensa/target_signal.h | 6 ------ 60 files changed, 83 insertions(+), 177 deletions(-) diff --git a/linux-user/aarch64/signal.c b/linux-user/aarch64/signal.c index f95dc61dfb..07fedfc33c 100644 --- a/linux-user/aarch64/signal.c +++ b/linux-user/aarch64/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/aarch64/target_cpu.h b/linux-user/aarch64/target_cpu.h index 777ce29f16..a021c95fa4 100644 --- a/linux-user/aarch64/target_cpu.h +++ b/linux-user/aarch64/target_cpu.h @@ -35,4 +35,8 @@ static inline void cpu_set_tls(CPUARMState *env, target_ulong newtls) env->cp15.tpidr_el[0] = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUARMState *state) +{ + return state->xregs[31]; +} #endif diff --git a/linux-user/aarch64/target_signal.h b/linux-user/aarch64/target_signal.h index 0b7ae25120..18599b1447 100644 --- a/linux-user/aarch64/target_signal.h +++ b/linux-user/aarch64/target_signal.h @@ -1,8 +1,6 @@ #ifndef AARCH64_TARGET_SIGNAL_H #define AARCH64_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUARMState *state) -{ - return state->xregs[31]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* AARCH64_TARGET_SIGNAL_H */ diff --git a/linux-user/alpha/signal.c b/linux-user/alpha/signal.c index f24de02c6f..c5c27ce084 100644 --- a/linux-user/alpha/signal.c +++ b/linux-user/alpha/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/alpha/target_cpu.h b/linux-user/alpha/target_cpu.h index ad124da7c0..ac4d255ae7 100644 --- a/linux-user/alpha/target_cpu.h +++ b/linux-user/alpha/target_cpu.h @@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUAlphaState *env, target_ulong newtls) env->unique = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUAlphaState *state) +{ + return state->ir[IR_SP]; +} #endif diff --git a/linux-user/alpha/target_signal.h b/linux-user/alpha/target_signal.h index 4e912e1cf9..e6f2f04911 100644 --- a/linux-user/alpha/target_signal.h +++ b/linux-user/alpha/target_signal.h @@ -1,8 +1,6 @@ #ifndef ALPHA_TARGET_SIGNAL_H #define ALPHA_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -22,12 +20,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 4096 #define TARGET_SIGSTKSZ 16384 -static inline abi_ulong get_sp_from_cpustate(CPUAlphaState *state) -{ - return state->ir[IR_SP]; -} - - /* From . */ #define TARGET_GEN_INTOVF -1 /* integer overflow */ #define TARGET_GEN_INTDIV -2 /* integer division by zero */ diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c index 59b5b65ed1..b0e753801b 100644 --- a/linux-user/arm/signal.c +++ b/linux-user/arm/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/arm/target_cpu.h b/linux-user/arm/target_cpu.h index c3eb4b243d..8a3764919a 100644 --- a/linux-user/arm/target_cpu.h +++ b/linux-user/arm/target_cpu.h @@ -49,4 +49,8 @@ static inline target_ulong cpu_get_tls(CPUARMState *env) } } +static inline abi_ulong get_sp_from_cpustate(CPUARMState *state) +{ + return state->regs[13]; +} #endif diff --git a/linux-user/arm/target_signal.h b/linux-user/arm/target_signal.h index d6a03ec87d..f80eb0a215 100644 --- a/linux-user/arm/target_signal.h +++ b/linux-user/arm/target_signal.h @@ -1,8 +1,6 @@ #ifndef ARM_TARGET_SIGNAL_H #define ARM_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUARMState *state) -{ - return state->regs[13]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* ARM_TARGET_SIGNAL_H */ diff --git a/linux-user/cris/signal.c b/linux-user/cris/signal.c index 322d9db1a7..0b405247cf 100644 --- a/linux-user/cris/signal.c +++ b/linux-user/cris/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/cris/target_cpu.h b/linux-user/cris/target_cpu.h index c43aac62f9..2309343979 100644 --- a/linux-user/cris/target_cpu.h +++ b/linux-user/cris/target_cpu.h @@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUCRISState *env, target_ulong newtls) env->pregs[PR_PID] = (env->pregs[PR_PID] & 0xff) | newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUCRISState *state) +{ + return state->regs[14]; +} #endif diff --git a/linux-user/cris/target_signal.h b/linux-user/cris/target_signal.h index 74ff2f3382..bf404a85fd 100644 --- a/linux-user/cris/target_signal.h +++ b/linux-user/cris/target_signal.h @@ -1,8 +1,6 @@ #ifndef CRIS_TARGET_SIGNAL_H #define CRIS_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUCRISState *state) -{ - return state->regs[14]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* CRIS_TARGET_SIGNAL_H */ diff --git a/linux-user/hppa/signal.c b/linux-user/hppa/signal.c index 6e7a295aee..b6927ee673 100644 --- a/linux-user/hppa/signal.c +++ b/linux-user/hppa/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h index 7b78bbea80..1c539bdbd6 100644 --- a/linux-user/hppa/target_cpu.h +++ b/linux-user/hppa/target_cpu.h @@ -16,8 +16,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ -#ifndef ALPHA_TARGET_CPU_H -#define ALPHA_TARGET_CPU_H +#ifndef HPPA_TARGET_CPU_H +#define HPPA_TARGET_CPU_H static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp) { @@ -36,4 +36,8 @@ static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls) env->cr[27] = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUHPPAState *state) +{ + return state->gr[30]; +} #endif diff --git a/linux-user/hppa/target_signal.h b/linux-user/hppa/target_signal.h index f28b4bf6e8..1beae6485a 100644 --- a/linux-user/hppa/target_signal.h +++ b/linux-user/hppa/target_signal.h @@ -1,8 +1,6 @@ #ifndef HPPA_TARGET_SIGNAL_H #define HPPA_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,8 +19,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUHPPAState *state) -{ - return state->gr[30]; -} #endif /* HPPA_TARGET_SIGNAL_H */ diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index e9a23a2dec..fecb4c99c3 100644 --- a/linux-user/i386/signal.c +++ b/linux-user/i386/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/i386/target_cpu.h b/linux-user/i386/target_cpu.h index 7fbcf9bb57..ece04d0966 100644 --- a/linux-user/i386/target_cpu.h +++ b/linux-user/i386/target_cpu.h @@ -45,4 +45,8 @@ static inline void cpu_set_tls(CPUX86State *env, target_ulong newtls) } #endif /* defined(TARGET_ABI32) */ +static inline abi_ulong get_sp_from_cpustate(CPUX86State *state) +{ + return state->regs[R_ESP]; +} #endif /* I386_TARGET_CPU_H */ diff --git a/linux-user/i386/target_signal.h b/linux-user/i386/target_signal.h index 6ad4089482..8a284f4b57 100644 --- a/linux-user/i386/target_signal.h +++ b/linux-user/i386/target_signal.h @@ -1,8 +1,6 @@ #ifndef I386_TARGET_SIGNAL_H #define I386_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUX86State *state) -{ - return state->regs[R_ESP]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* I386_TARGET_SIGNAL_H */ diff --git a/linux-user/m68k/signal.c b/linux-user/m68k/signal.c index 5dd8bb5f99..38bd77ec16 100644 --- a/linux-user/m68k/signal.c +++ b/linux-user/m68k/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/m68k/target_cpu.h b/linux-user/m68k/target_cpu.h index cc0bfc298e..611df065ca 100644 --- a/linux-user/m68k/target_cpu.h +++ b/linux-user/m68k/target_cpu.h @@ -37,4 +37,8 @@ static inline void cpu_set_tls(CPUM68KState *env, target_ulong newtls) ts->tp_value = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUM68KState *state) +{ + return state->aregs[7]; +} #endif diff --git a/linux-user/m68k/target_signal.h b/linux-user/m68k/target_signal.h index ff303f2b3c..0cf26b79e5 100644 --- a/linux-user/m68k/target_signal.h +++ b/linux-user/m68k/target_signal.h @@ -1,8 +1,6 @@ #ifndef M68K_TARGET_SIGNAL_H #define M68K_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUM68KState *state) -{ - return state->aregs[7]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* M68K_TARGET_SIGNAL_H */ diff --git a/linux-user/microblaze/signal.c b/linux-user/microblaze/signal.c index fada0f1495..712ee522b2 100644 --- a/linux-user/microblaze/signal.c +++ b/linux-user/microblaze/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/microblaze/target_cpu.h b/linux-user/microblaze/target_cpu.h index 7dd979f960..73e139938c 100644 --- a/linux-user/microblaze/target_cpu.h +++ b/linux-user/microblaze/target_cpu.h @@ -32,4 +32,8 @@ static inline void cpu_set_tls(CPUMBState *env, target_ulong newtls) env->regs[21] = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUMBState *state) +{ + return state->regs[1]; +} #endif diff --git a/linux-user/microblaze/target_signal.h b/linux-user/microblaze/target_signal.h index 9fe4048292..86adcc1fc9 100644 --- a/linux-user/microblaze/target_signal.h +++ b/linux-user/microblaze/target_signal.h @@ -1,8 +1,6 @@ #ifndef MICROBLAZE_TARGET_SIGNAL_H #define MICROBLAZE_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUMBState *state) -{ - return state->regs[1]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* MICROBLAZE_TARGET_SIGNAL_H */ diff --git a/linux-user/mips/signal.c b/linux-user/mips/signal.c index ed9849c7f6..6aa303ec9c 100644 --- a/linux-user/mips/signal.c +++ b/linux-user/mips/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/mips/target_cpu.h b/linux-user/mips/target_cpu.h index 2002920312..02cf5eeff7 100644 --- a/linux-user/mips/target_cpu.h +++ b/linux-user/mips/target_cpu.h @@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUMIPSState *env, target_ulong newtls) env->active_tc.CP0_UserLocal = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state) +{ + return state->active_tc.gpr[29]; +} #endif diff --git a/linux-user/mips/target_signal.h b/linux-user/mips/target_signal.h index d36f5da0a0..5f68bd7634 100644 --- a/linux-user/mips/target_signal.h +++ b/linux-user/mips/target_signal.h @@ -1,8 +1,6 @@ #ifndef MIPS_TARGET_SIGNAL_H #define MIPS_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,11 +19,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state) -{ - return state->active_tc.gpr[29]; -} - #if defined(TARGET_ABI_MIPSO32) /* compare linux/arch/mips/kernel/signal.c:setup_frame() */ #define TARGET_ARCH_HAS_SETUP_FRAME diff --git a/linux-user/mips64/target_signal.h b/linux-user/mips64/target_signal.h index c074e1592f..7fe6b2f517 100644 --- a/linux-user/mips64/target_signal.h +++ b/linux-user/mips64/target_signal.h @@ -1,8 +1,6 @@ #ifndef MIPS64_TARGET_SIGNAL_H #define MIPS64_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,8 +19,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state) -{ - return state->active_tc.gpr[29]; -} #endif /* MIPS64_TARGET_SIGNAL_H */ diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c index 9a0b36e5ad..4985dc2212 100644 --- a/linux-user/nios2/signal.c +++ b/linux-user/nios2/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/nios2/target_cpu.h b/linux-user/nios2/target_cpu.h index 20ab4790a9..14f63338fa 100644 --- a/linux-user/nios2/target_cpu.h +++ b/linux-user/nios2/target_cpu.h @@ -36,4 +36,8 @@ static inline void cpu_set_tls(CPUNios2State *env, target_ulong newtls) */ } +static inline abi_ulong get_sp_from_cpustate(CPUNios2State *state) +{ + return state->regs[R_SP]; +} #endif diff --git a/linux-user/nios2/target_signal.h b/linux-user/nios2/target_signal.h index f4db4d6d62..1f09f1e6bb 100644 --- a/linux-user/nios2/target_signal.h +++ b/linux-user/nios2/target_signal.h @@ -1,8 +1,6 @@ #ifndef TARGET_SIGNAL_H #define TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -18,8 +16,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUNios2State *state) -{ - return state->regs[R_SP]; -} #endif /* TARGET_SIGNAL_H */ diff --git a/linux-user/openrisc/signal.c b/linux-user/openrisc/signal.c index ecf2897ccd..8be0b74001 100644 --- a/linux-user/openrisc/signal.c +++ b/linux-user/openrisc/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/openrisc/target_cpu.h b/linux-user/openrisc/target_cpu.h index 606ad6f695..d1ea4506e2 100644 --- a/linux-user/openrisc/target_cpu.h +++ b/linux-user/openrisc/target_cpu.h @@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUOpenRISCState *env, target_ulong newtls) cpu_set_gpr(env, 10, newtls); } +static inline abi_ulong get_sp_from_cpustate(CPUOpenRISCState *state) +{ + return cpu_get_gpr(state, 1); +} #endif diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/target_signal.h index 2a4e00b035..590383302c 100644 --- a/linux-user/openrisc/target_signal.h +++ b/linux-user/openrisc/target_signal.h @@ -1,8 +1,6 @@ #ifndef OPENRISC_TARGET_SIGNAL_H #define OPENRISC_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -18,8 +16,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUOpenRISCState *state) -{ - return cpu_get_gpr(state, 1); -} #endif /* OPENRISC_TARGET_SIGNAL_H */ diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index cacc9afb5a..ef4c518f11 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/ppc/target_cpu.h b/linux-user/ppc/target_cpu.h index 3aab3d185d..c4641834e7 100644 --- a/linux-user/ppc/target_cpu.h +++ b/linux-user/ppc/target_cpu.h @@ -47,5 +47,8 @@ static inline uint32_t get_ppc64_abi(struct image_info *infop) return infop->elf_flags & EF_PPC64_ABI; } - +static inline abi_ulong get_sp_from_cpustate(CPUPPCState *state) +{ + return state->gpr[1]; +} #endif diff --git a/linux-user/ppc/target_signal.h b/linux-user/ppc/target_signal.h index e3bf1d2856..6f9e67e321 100644 --- a/linux-user/ppc/target_signal.h +++ b/linux-user/ppc/target_signal.h @@ -1,8 +1,6 @@ #ifndef PPC_TARGET_SIGNAL_H #define PPC_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,11 +19,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUPPCState *state) -{ - return state->gpr[1]; -} - #if !defined(TARGET_PPC64) #define TARGET_ARCH_HAS_SETUP_FRAME #endif diff --git a/linux-user/qemu.h b/linux-user/qemu.h index c55c8e294b..6fa1e968db 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -623,7 +623,6 @@ static inline void *lock_user_string(abi_ulong guest_addr) * above, so include them last. */ #include "target_cpu.h" -#include "target_signal.h" #include "target_structs.h" #endif /* QEMU_H */ diff --git a/linux-user/riscv/signal.c b/linux-user/riscv/signal.c index ef599e319a..f598d41891 100644 --- a/linux-user/riscv/signal.c +++ b/linux-user/riscv/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/riscv/target_cpu.h b/linux-user/riscv/target_cpu.h index c5549b1120..7e090f376a 100644 --- a/linux-user/riscv/target_cpu.h +++ b/linux-user/riscv/target_cpu.h @@ -15,4 +15,8 @@ static inline void cpu_set_tls(CPURISCVState *env, target_ulong newtls) env->gpr[xTP] = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPURISCVState *state) +{ + return state->gpr[xSP]; +} #endif diff --git a/linux-user/riscv/target_signal.h b/linux-user/riscv/target_signal.h index 9dac002c0d..c7fa357008 100644 --- a/linux-user/riscv/target_signal.h +++ b/linux-user/riscv/target_signal.h @@ -1,8 +1,6 @@ #ifndef TARGET_SIGNAL_H #define TARGET_SIGNAL_H -#include "cpu.h" - typedef struct target_sigaltstack { abi_ulong ss_sp; abi_int ss_flags; @@ -15,8 +13,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPURISCVState *state) -{ - return state->gpr[xSP]; -} #endif /* TARGET_SIGNAL_H */ diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index e35cbe6870..3d3cb67bbe 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/s390x/target_cpu.h b/linux-user/s390x/target_cpu.h index 87ea4d2d9b..66ef8aa8c2 100644 --- a/linux-user/s390x/target_cpu.h +++ b/linux-user/s390x/target_cpu.h @@ -36,4 +36,8 @@ static inline void cpu_set_tls(CPUS390XState *env, target_ulong newtls) env->aregs[1] = newtls & 0xffffffffULL; } +static inline abi_ulong get_sp_from_cpustate(CPUS390XState *state) +{ + return state->regs[15]; +} #endif diff --git a/linux-user/s390x/target_signal.h b/linux-user/s390x/target_signal.h index 4e99f8fadd..8f41ccf9b2 100644 --- a/linux-user/s390x/target_signal.h +++ b/linux-user/s390x/target_signal.h @@ -1,8 +1,6 @@ #ifndef S390X_TARGET_SIGNAL_H #define S390X_TARGET_SIGNAL_H -#include "cpu.h" - typedef struct target_sigaltstack { abi_ulong ss_sp; int ss_flags; @@ -18,10 +16,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUS390XState *state) -{ - return state->regs[15]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* S390X_TARGET_SIGNAL_H */ diff --git a/linux-user/sh4/signal.c b/linux-user/sh4/signal.c index 2a5378e16e..c6752baa7e 100644 --- a/linux-user/sh4/signal.c +++ b/linux-user/sh4/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/sh4/target_cpu.h b/linux-user/sh4/target_cpu.h index 9d305d2833..1a647ddb98 100644 --- a/linux-user/sh4/target_cpu.h +++ b/linux-user/sh4/target_cpu.h @@ -32,4 +32,8 @@ static inline void cpu_set_tls(CPUSH4State *env, target_ulong newtls) env->gbr = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUSH4State *state) +{ + return state->gregs[15]; +} #endif diff --git a/linux-user/sh4/target_signal.h b/linux-user/sh4/target_signal.h index e7b18a6db4..2bdc24c48e 100644 --- a/linux-user/sh4/target_signal.h +++ b/linux-user/sh4/target_signal.h @@ -1,8 +1,6 @@ #ifndef SH4_TARGET_SIGNAL_H #define SH4_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,10 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUSH4State *state) -{ - return state->gregs[15]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* SH4_TARGET_SIGNAL_H */ diff --git a/linux-user/signal.c b/linux-user/signal.c index 01de433e3a..be2815b45d 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -23,7 +23,6 @@ #include "qemu.h" #include "qemu-common.h" -#include "target_signal.h" #include "trace.h" #include "signal-common.h" diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 45e922f328..55e9d6f9b2 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index f2fe526204..1ffc0ae9f2 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -41,4 +41,15 @@ static inline void cpu_set_tls(CPUSPARCState *env, target_ulong newtls) env->gregs[7] = newtls; } +#ifndef UREG_I6 +#define UREG_I6 6 +#endif +#ifndef UREG_FP +#define UREG_FP UREG_I6 +#endif + +static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state) +{ + return state->regwptr[UREG_FP]; +} #endif diff --git a/linux-user/sparc/target_signal.h b/linux-user/sparc/target_signal.h index 467abea49e..bfa19bbb67 100644 --- a/linux-user/sparc/target_signal.h +++ b/linux-user/sparc/target_signal.h @@ -1,8 +1,6 @@ #ifndef SPARC_TARGET_SIGNAL_H #define SPARC_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,17 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 4096 #define TARGET_SIGSTKSZ 16384 -#ifndef UREG_I6 -#define UREG_I6 6 -#endif -#ifndef UREG_FP -#define UREG_FP UREG_I6 -#endif - -static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state) -{ - return state->regwptr[UREG_FP]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* SPARC_TARGET_SIGNAL_H */ diff --git a/linux-user/sparc64/target_signal.h b/linux-user/sparc64/target_signal.h index 14b01d9632..1d804bfe86 100644 --- a/linux-user/sparc64/target_signal.h +++ b/linux-user/sparc64/target_signal.h @@ -1,8 +1,6 @@ #ifndef SPARC64_TARGET_SIGNAL_H #define SPARC64_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,17 +19,5 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 4096 #define TARGET_SIGSTKSZ 16384 -#ifndef UREG_I6 -#define UREG_I6 6 -#endif -#ifndef UREG_FP -#define UREG_FP UREG_I6 -#endif - -static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state) -{ - return state->regwptr[UREG_FP]; -} - #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* SPARC64_TARGET_SIGNAL_H */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index fbf1bf995a..85e0d870d8 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -482,6 +482,8 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SA_RESTORER 0x04000000 #endif +#include "target_signal.h" + #ifdef TARGET_SA_RESTORER #define TARGET_ARCH_HAS_SA_RESTORER 1 #endif diff --git a/linux-user/tilegx/signal.c b/linux-user/tilegx/signal.c index d0ed3de569..c5a1c7161d 100644 --- a/linux-user/tilegx/signal.c +++ b/linux-user/tilegx/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/tilegx/target_cpu.h b/linux-user/tilegx/target_cpu.h index 4878e01b03..d1aa5824f2 100644 --- a/linux-user/tilegx/target_cpu.h +++ b/linux-user/tilegx/target_cpu.h @@ -32,4 +32,8 @@ static inline void cpu_set_tls(CPUTLGState *env, target_ulong newtls) env->regs[TILEGX_R_TP] = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUTLGState *state) +{ + return state->regs[TILEGX_R_SP]; +} #endif diff --git a/linux-user/tilegx/target_signal.h b/linux-user/tilegx/target_signal.h index a74fa37aac..4cb8c56adf 100644 --- a/linux-user/tilegx/target_signal.h +++ b/linux-user/tilegx/target_signal.h @@ -1,8 +1,6 @@ #ifndef TILEGX_TARGET_SIGNAL_H #define TILEGX_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -20,8 +18,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUTLGState *state) -{ - return state->regs[TILEGX_R_SP]; -} #endif /* TILEGX_TARGET_SIGNAL_H */ diff --git a/linux-user/x86_64/target_signal.h b/linux-user/x86_64/target_signal.h index 6b01b5acb7..be054d1e59 100644 --- a/linux-user/x86_64/target_signal.h +++ b/linux-user/x86_64/target_signal.h @@ -1,8 +1,6 @@ #ifndef X86_64_TARGET_SIGNAL_H #define X86_64_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -21,8 +19,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUX86State *state) -{ - return state->regs[R_ESP]; -} #endif /* X86_64_TARGET_SIGNAL_H */ diff --git a/linux-user/xtensa/signal.c b/linux-user/xtensa/signal.c index 3e483efc61..8d54ef3ae3 100644 --- a/linux-user/xtensa/signal.c +++ b/linux-user/xtensa/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/xtensa/target_cpu.h b/linux-user/xtensa/target_cpu.h index 747d828614..e31efe3ea0 100644 --- a/linux-user/xtensa/target_cpu.h +++ b/linux-user/xtensa/target_cpu.h @@ -19,4 +19,8 @@ static inline void cpu_set_tls(CPUXtensaState *env, target_ulong newtls) env->uregs[THREADPTR] = newtls; } +static inline abi_ulong get_sp_from_cpustate(CPUXtensaState *state) +{ + return state->regs[1]; +} #endif diff --git a/linux-user/xtensa/target_signal.h b/linux-user/xtensa/target_signal.h index 4376b2e538..de03c0a564 100644 --- a/linux-user/xtensa/target_signal.h +++ b/linux-user/xtensa/target_signal.h @@ -1,8 +1,6 @@ #ifndef XTENSA_TARGET_SIGNAL_H #define XTENSA_TARGET_SIGNAL_H -#include "cpu.h" - /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -20,8 +18,4 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 -static inline abi_ulong get_sp_from_cpustate(CPUXtensaState *state) -{ - return state->regs[1]; -} #endif From patchwork Mon Jun 4 15:20:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925101 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 40zzLl0yzGz9s08 for ; Tue, 5 Jun 2018 01:26:55 +1000 (AEST) Received: from localhost ([::1]:40371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrNk-0007ja-P8 for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:26:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHu-0002E6-PC for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHr-00062F-8P for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:50 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:59035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHq-00060b-Oi for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:47 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MWLRl-1fnisG1YrZ-00XKII; Mon, 04 Jun 2018 17:20:37 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:09 +0200 Message-Id: <20180604152015.13359-12-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:EBei0BwfhxFjbDdBm8Dn/GU2jTTqo0b9eTYj/3NC4xAZp8wIikM AJNcaDSWjgFkfW32izqfCUzAieDBvvqBmLOw1x4qjTymszDgv8PadKSS8SrNbImQZjY89S4 qyz5q+qCSFXmL/S9os5IByfEZ7y3KKiRlzpv66mn6RvI77zIYty/9CQzL0Fm8k6OC0LzzBq kinl6QaVjBabbM8wxki6w== X-UI-Out-Filterresults: notjunk:1; V01:K0:D1n7UvA1YAk=:7Hq/FExAQXv0Erc00i9kHA lD+rn/P22+IxQX+YllUU608r2m6lXVrN+wZcdkbzRQPCK4G6cEtO5kn4Nu7Gsb5oPVzB2YytT eK2Ixn8z27imO1aqsYqCQbJjZua52gsoPg8Z3J1hwkwIJo2oe9uBsxsVh5QkEDKCNNKWRzTZI 8Dglx+jqbbGJcGCvOh11BikuBIMvl0PGETphuNrR+iH7HzbfYHgbccgvhygVmVHd/7QcJETqd SsntEUaztOPSpcGN3ZkHhsiiv6fU3ifhCDGUjhx7SeHFjtWkibpa9wbZ7cjwWj9F/+d8nIhle CfKuD5fyhYvbb2uGtyHPOC5EELTYl27zRKyZ4WcSgzZ4slUMoDgu4YCgrA3F/oW+vz96vKJlt ovkW2+B5HAyr7MSY+hQUSMb6gWzGD3ZXDjo/Rh7eNzigoamx4r3QsiZwL04Oiam58Mj9irMlQ 64zkXQzF2Iql91VQopinWUGuH4Dz9iNNZvudQ0Fo2kTVUXrx+UbDuHoLU6Sm/Tlul59S3qmwy oOEuKTsn8LCylFY47mVjV76BBZcsAEkmuQdH+8P/+dxP5jr3GNwfVx6IkVgnzKmIttTEA54hV cwfbecMQiccApLot/yDOdeaQXV13Wzstz/iAUP3SF8tnofAn/Yj4bUPaMtXDYrEr1uA9NMRpR XLGMpCcv49FkmRvREK74JV0wdJ1zhHgk9yfwmFycwpAT3a7McGf/BG3DuGYmBTYyoqak= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL 11/17] linux-user: move generic signal definitions to generic/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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-10-laurent@vivier.eu> --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/arm/target_signal.h | 2 ++ linux-user/cris/target_signal.h | 2 ++ linux-user/generic/signal.h | 57 +++++++++++++++++++++++++++++++++++ linux-user/i386/target_signal.h | 2 ++ linux-user/m68k/target_signal.h | 2 ++ linux-user/microblaze/target_signal.h | 2 ++ linux-user/nios2/target_signal.h | 2 ++ linux-user/openrisc/target_signal.h | 2 ++ linux-user/ppc/target_signal.h | 2 ++ linux-user/riscv/target_signal.h | 2 ++ linux-user/s390x/target_signal.h | 2 ++ linux-user/sh4/target_signal.h | 2 ++ linux-user/syscall_defs.h | 50 ------------------------------ linux-user/tilegx/target_signal.h | 2 ++ linux-user/x86_64/target_signal.h | 2 ++ linux-user/xtensa/target_signal.h | 2 ++ 17 files changed, 87 insertions(+), 50 deletions(-) create mode 100644 linux-user/generic/signal.h diff --git a/linux-user/aarch64/target_signal.h b/linux-user/aarch64/target_signal.h index 18599b1447..ddd73169f0 100644 --- a/linux-user/aarch64/target_signal.h +++ b/linux-user/aarch64/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* AARCH64_TARGET_SIGNAL_H */ diff --git a/linux-user/arm/target_signal.h b/linux-user/arm/target_signal.h index f80eb0a215..ea123c40f3 100644 --- a/linux-user/arm/target_signal.h +++ b/linux-user/arm/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* ARM_TARGET_SIGNAL_H */ diff --git a/linux-user/cris/target_signal.h b/linux-user/cris/target_signal.h index bf404a85fd..1cb5548f85 100644 --- a/linux-user/cris/target_signal.h +++ b/linux-user/cris/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* CRIS_TARGET_SIGNAL_H */ diff --git a/linux-user/generic/signal.h b/linux-user/generic/signal.h new file mode 100644 index 0000000000..e1083f8fba --- /dev/null +++ b/linux-user/generic/signal.h @@ -0,0 +1,57 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef GENERIC_SIGNAL_H +#define GENERIC_SIGNAL_H + +#define TARGET_SA_NOCLDSTOP 0x00000001 +#define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ +#define TARGET_SA_SIGINFO 0x00000004 +#define TARGET_SA_ONSTACK 0x08000000 +#define TARGET_SA_RESTART 0x10000000 +#define TARGET_SA_NODEFER 0x40000000 +#define TARGET_SA_RESETHAND 0x80000000 +#define TARGET_SA_RESTORER 0x04000000 + +#define TARGET_SIGHUP 1 +#define TARGET_SIGINT 2 +#define TARGET_SIGQUIT 3 +#define TARGET_SIGILL 4 +#define TARGET_SIGTRAP 5 +#define TARGET_SIGABRT 6 +#define TARGET_SIGIOT 6 +#define TARGET_SIGBUS 7 +#define TARGET_SIGFPE 8 +#define TARGET_SIGKILL 9 +#define TARGET_SIGUSR1 10 +#define TARGET_SIGSEGV 11 +#define TARGET_SIGUSR2 12 +#define TARGET_SIGPIPE 13 +#define TARGET_SIGALRM 14 +#define TARGET_SIGTERM 15 +#define TARGET_SIGSTKFLT 16 +#define TARGET_SIGCHLD 17 +#define TARGET_SIGCONT 18 +#define TARGET_SIGSTOP 19 +#define TARGET_SIGTSTP 20 +#define TARGET_SIGTTIN 21 +#define TARGET_SIGTTOU 22 +#define TARGET_SIGURG 23 +#define TARGET_SIGXCPU 24 +#define TARGET_SIGXFSZ 25 +#define TARGET_SIGVTALRM 26 +#define TARGET_SIGPROF 27 +#define TARGET_SIGWINCH 28 +#define TARGET_SIGIO 29 +#define TARGET_SIGPWR 30 +#define TARGET_SIGSYS 31 +#define TARGET_SIGRTMIN 32 + +#define TARGET_SIG_BLOCK 0 /* for blocking signals */ +#define TARGET_SIG_UNBLOCK 1 /* for unblocking signals */ +#define TARGET_SIG_SETMASK 2 /* for setting the signal mask */ +#endif diff --git a/linux-user/i386/target_signal.h b/linux-user/i386/target_signal.h index 8a284f4b57..f55e78fd33 100644 --- a/linux-user/i386/target_signal.h +++ b/linux-user/i386/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* I386_TARGET_SIGNAL_H */ diff --git a/linux-user/m68k/target_signal.h b/linux-user/m68k/target_signal.h index 0cf26b79e5..314e808844 100644 --- a/linux-user/m68k/target_signal.h +++ b/linux-user/m68k/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* M68K_TARGET_SIGNAL_H */ diff --git a/linux-user/microblaze/target_signal.h b/linux-user/microblaze/target_signal.h index 86adcc1fc9..35efd5e928 100644 --- a/linux-user/microblaze/target_signal.h +++ b/linux-user/microblaze/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* MICROBLAZE_TARGET_SIGNAL_H */ diff --git a/linux-user/nios2/target_signal.h b/linux-user/nios2/target_signal.h index 1f09f1e6bb..7776bcdbfd 100644 --- a/linux-user/nios2/target_signal.h +++ b/linux-user/nios2/target_signal.h @@ -16,4 +16,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #endif /* TARGET_SIGNAL_H */ diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/target_signal.h index 590383302c..3ccbb974d9 100644 --- a/linux-user/openrisc/target_signal.h +++ b/linux-user/openrisc/target_signal.h @@ -16,4 +16,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #endif /* OPENRISC_TARGET_SIGNAL_H */ diff --git a/linux-user/ppc/target_signal.h b/linux-user/ppc/target_signal.h index 6f9e67e321..4453e2e7ef 100644 --- a/linux-user/ppc/target_signal.h +++ b/linux-user/ppc/target_signal.h @@ -19,6 +19,8 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #if !defined(TARGET_PPC64) #define TARGET_ARCH_HAS_SETUP_FRAME #endif diff --git a/linux-user/riscv/target_signal.h b/linux-user/riscv/target_signal.h index c7fa357008..c8b1455800 100644 --- a/linux-user/riscv/target_signal.h +++ b/linux-user/riscv/target_signal.h @@ -13,4 +13,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #endif /* TARGET_SIGNAL_H */ diff --git a/linux-user/s390x/target_signal.h b/linux-user/s390x/target_signal.h index 8f41ccf9b2..b58bc7c20f 100644 --- a/linux-user/s390x/target_signal.h +++ b/linux-user/s390x/target_signal.h @@ -16,5 +16,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* S390X_TARGET_SIGNAL_H */ diff --git a/linux-user/sh4/target_signal.h b/linux-user/sh4/target_signal.h index 2bdc24c48e..434970a990 100644 --- a/linux-user/sh4/target_signal.h +++ b/linux-user/sh4/target_signal.h @@ -19,5 +19,7 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #define TARGET_ARCH_HAS_SETUP_FRAME #endif /* SH4_TARGET_SIGNAL_H */ diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 85e0d870d8..44dc7831d6 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -471,15 +471,6 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SA_NODEFER 0x00000020 #define TARGET_SA_RESTART 0x00000040 #define TARGET_SA_NOCLDWAIT 0x00000080 -#else -#define TARGET_SA_NOCLDSTOP 0x00000001 -#define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ -#define TARGET_SA_SIGINFO 0x00000004 -#define TARGET_SA_ONSTACK 0x08000000 -#define TARGET_SA_RESTART 0x10000000 -#define TARGET_SA_NODEFER 0x40000000 -#define TARGET_SA_RESETHAND 0x80000000 -#define TARGET_SA_RESTORER 0x04000000 #endif #include "target_signal.h" @@ -650,47 +641,6 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SIG_UNBLOCK 1 #define TARGET_SIG_SETMASK 2 -#else - -/* OpenRISC Using the general signals */ -#define TARGET_SIGHUP 1 -#define TARGET_SIGINT 2 -#define TARGET_SIGQUIT 3 -#define TARGET_SIGILL 4 -#define TARGET_SIGTRAP 5 -#define TARGET_SIGABRT 6 -#define TARGET_SIGIOT 6 -#define TARGET_SIGBUS 7 -#define TARGET_SIGFPE 8 -#define TARGET_SIGKILL 9 -#define TARGET_SIGUSR1 10 -#define TARGET_SIGSEGV 11 -#define TARGET_SIGUSR2 12 -#define TARGET_SIGPIPE 13 -#define TARGET_SIGALRM 14 -#define TARGET_SIGTERM 15 -#define TARGET_SIGSTKFLT 16 -#define TARGET_SIGCHLD 17 -#define TARGET_SIGCONT 18 -#define TARGET_SIGSTOP 19 -#define TARGET_SIGTSTP 20 -#define TARGET_SIGTTIN 21 -#define TARGET_SIGTTOU 22 -#define TARGET_SIGURG 23 -#define TARGET_SIGXCPU 24 -#define TARGET_SIGXFSZ 25 -#define TARGET_SIGVTALRM 26 -#define TARGET_SIGPROF 27 -#define TARGET_SIGWINCH 28 -#define TARGET_SIGIO 29 -#define TARGET_SIGPWR 30 -#define TARGET_SIGSYS 31 -#define TARGET_SIGRTMIN 32 - -#define TARGET_SIG_BLOCK 0 /* for blocking signals */ -#define TARGET_SIG_UNBLOCK 1 /* for unblocking signals */ -#define TARGET_SIG_SETMASK 2 /* for setting the signal mask */ - #endif #if defined(TARGET_ALPHA) diff --git a/linux-user/tilegx/target_signal.h b/linux-user/tilegx/target_signal.h index 4cb8c56adf..655be13009 100644 --- a/linux-user/tilegx/target_signal.h +++ b/linux-user/tilegx/target_signal.h @@ -18,4 +18,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #endif /* TILEGX_TARGET_SIGNAL_H */ diff --git a/linux-user/x86_64/target_signal.h b/linux-user/x86_64/target_signal.h index be054d1e59..4c4380f7b9 100644 --- a/linux-user/x86_64/target_signal.h +++ b/linux-user/x86_64/target_signal.h @@ -19,4 +19,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #endif /* X86_64_TARGET_SIGNAL_H */ diff --git a/linux-user/xtensa/target_signal.h b/linux-user/xtensa/target_signal.h index de03c0a564..c60bf656f6 100644 --- a/linux-user/xtensa/target_signal.h +++ b/linux-user/xtensa/target_signal.h @@ -18,4 +18,6 @@ typedef struct target_sigaltstack { #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 +#include "../generic/signal.h" + #endif From patchwork Mon Jun 4 15:20:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925085 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 40zzDh4Fs7z9s08 for ; Tue, 5 Jun 2018 01:21:40 +1000 (AEST) Received: from localhost ([::1]:40340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrIe-0002Gw-H9 for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:21:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHu-0002Dp-F1 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHr-00062V-C6 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:50 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:56591) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHr-00060t-0Y for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:47 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Ljgrt-1g16ul0TGr-00bsda; Mon, 04 Jun 2018 17:20:38 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:10 +0200 Message-Id: <20180604152015.13359-13-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:TAmecUhtl+6k7Ot6WWIykQsUCOdW63TJ6xKY93wtCt3nuR4OEI0 ixYytNLudSnj9Uc/iR/zBQYh8Xj6gOM922TMAxbcbApFnqEdtlUL6tVZ4CEvENw/EIarMwJ /61ulavLOXdyFzVE+JnrJ/30NhuQWKFEZ6GDcoHqi5z6/wAadc9VKk4iLwSTEjhU1fS3lPb LVLUYXBChvCSul5KC5Lbg== X-UI-Out-Filterresults: notjunk:1; V01:K0:aEGMgGo/bl0=:wYJ0v5KU6S9aLohyeONOEa YBxAXezafptNNpY2ihxwVCTaVpLyzQWurJ+fTQmuRCGwmbnDKb/y9CSG15j8UICGiSDd8lUxu E3CaEUlqZNSaQGBcHeBtcVqHdb8f/7PD4ObbZomQ5w5sibrNpiuvEDeJhNgl1OSxOjljp3+1b NLiEzLdz0MzKcYL3gD7aLuUqeKEVoLoVK85Axe0EwnzPYEYFX6E6nTOvYZXNkBpKRFwISphO9 4OUYda52d3TLaFq+xBDP10pmcDsB/tqYpU6705kf10wHjyq74Vs1/c4xw0YZRZ6YqcLnG9dii jBx7ALAxRYTxDDWFoFop818nn35H6viMUofXVGTpNx+Oig1wLxnorpzN3+9rKLvfamNWo8ZgA VTZ9wAJI2PKPWkp+XPgJKOYTnvN/cA0xlaJDhmYGltYugfJmskB7KSzPxnEaLjRwUBTrHwXB5 U7+vpxDwfMqINW4oSJ/2OHYUtuaS0jzFFvWZn49cYadN11ePNNGeiH5Sljrjzyhum5VueExYC Hz5KnteJG5B0vSDrO2IdjnFI8ld9ZNYFlLmqF6hTRZT8k/pCCvvyTe4NCEm/kt2jemulOqIGp /e0QeMrZ8ldrMP++CyhnIVYU+pLW7NJUQN8qrV8007k9/5y8OxnnKZLw6AXpSiR4IA6O6UlTZ tAEwQ2RZfuG0RDo+nCJf7OyZNjqsXqs7q8RfOuUi+N7Pnafy8CK03sQ1Qx97sq3vfyW8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 Subject: [Qemu-devel] [PULL 12/17] linux-user: move sparc signal definitions to sparc/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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Remove sparc64/target_signal.h, use sparc/target_signal.h instead. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-11-laurent@vivier.eu> --- linux-user/sparc/target_signal.h | 48 +++++++++++++++++++++++++++++++++++ linux-user/sparc64/signal.c | 1 - linux-user/sparc64/target_signal.h | 24 +----------------- linux-user/syscall_defs.h | 52 +------------------------------------- 4 files changed, 50 insertions(+), 75 deletions(-) diff --git a/linux-user/sparc/target_signal.h b/linux-user/sparc/target_signal.h index bfa19bbb67..5cc40327d2 100644 --- a/linux-user/sparc/target_signal.h +++ b/linux-user/sparc/target_signal.h @@ -1,6 +1,44 @@ #ifndef SPARC_TARGET_SIGNAL_H #define SPARC_TARGET_SIGNAL_H +#define TARGET_SIGHUP 1 +#define TARGET_SIGINT 2 +#define TARGET_SIGQUIT 3 +#define TARGET_SIGILL 4 +#define TARGET_SIGTRAP 5 +#define TARGET_SIGABRT 6 +#define TARGET_SIGIOT 6 +#define TARGET_SIGSTKFLT 7 /* actually EMT */ +#define TARGET_SIGFPE 8 +#define TARGET_SIGKILL 9 +#define TARGET_SIGBUS 10 +#define TARGET_SIGSEGV 11 +#define TARGET_SIGSYS 12 +#define TARGET_SIGPIPE 13 +#define TARGET_SIGALRM 14 +#define TARGET_SIGTERM 15 +#define TARGET_SIGURG 16 +#define TARGET_SIGSTOP 17 +#define TARGET_SIGTSTP 18 +#define TARGET_SIGCONT 19 +#define TARGET_SIGCHLD 20 +#define TARGET_SIGTTIN 21 +#define TARGET_SIGTTOU 22 +#define TARGET_SIGIO 23 +#define TARGET_SIGXCPU 24 +#define TARGET_SIGXFSZ 25 +#define TARGET_SIGVTALRM 26 +#define TARGET_SIGPROF 27 +#define TARGET_SIGWINCH 28 +#define TARGET_SIGPWR 29 +#define TARGET_SIGUSR1 30 +#define TARGET_SIGUSR2 31 +#define TARGET_SIGRTMIN 32 + +#define TARGET_SIG_BLOCK 0x01 /* for blocking signals */ +#define TARGET_SIG_UNBLOCK 0x02 /* for unblocking signals */ +#define TARGET_SIG_SETMASK 0x04 /* for setting the signal mask */ + /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -16,6 +54,16 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 +#define TARGET_SA_NOCLDSTOP 8u +#define TARGET_SA_NOCLDWAIT 0x100u +#define TARGET_SA_SIGINFO 0x200u +#define TARGET_SA_ONSTACK 1u +#define TARGET_SA_RESTART 2u +#define TARGET_SA_NODEFER 0x20u +#define TARGET_SA_RESETHAND 4u +#define TARGET_ARCH_HAS_SA_RESTORER 1 +#define TARGET_ARCH_HAS_KA_RESTORER 1 + #define TARGET_MINSIGSTKSZ 4096 #define TARGET_SIGSTKSZ 16384 diff --git a/linux-user/sparc64/signal.c b/linux-user/sparc64/signal.c index c263eb0f08..170ebac232 100644 --- a/linux-user/sparc64/signal.c +++ b/linux-user/sparc64/signal.c @@ -16,5 +16,4 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ -#define SPARC_TARGET_SIGNAL_H /* to only include sparc64/target_signal.h */ #include "../sparc/signal.c" diff --git a/linux-user/sparc64/target_signal.h b/linux-user/sparc64/target_signal.h index 1d804bfe86..6a7d57d024 100644 --- a/linux-user/sparc64/target_signal.h +++ b/linux-user/sparc64/target_signal.h @@ -1,23 +1 @@ -#ifndef SPARC64_TARGET_SIGNAL_H -#define SPARC64_TARGET_SIGNAL_H - -/* this struct defines a stack used during syscall handling */ - -typedef struct target_sigaltstack { - abi_ulong ss_sp; - abi_long ss_flags; - abi_ulong ss_size; -} target_stack_t; - - -/* - * sigaltstack controls - */ -#define TARGET_SS_ONSTACK 1 -#define TARGET_SS_DISABLE 2 - -#define TARGET_MINSIGSTKSZ 4096 -#define TARGET_SIGSTKSZ 16384 - -#define TARGET_ARCH_HAS_SETUP_FRAME -#endif /* SPARC64_TARGET_SIGNAL_H */ +#include "../sparc/target_signal.h" diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 44dc7831d6..0034156c6b 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -426,17 +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_SPARC) -#define TARGET_SA_NOCLDSTOP 8u -#define TARGET_SA_NOCLDWAIT 0x100u -#define TARGET_SA_SIGINFO 0x200u -#define TARGET_SA_ONSTACK 1u -#define TARGET_SA_RESTART 2u -#define TARGET_SA_NODEFER 0x20u -#define TARGET_SA_RESETHAND 4u -#define TARGET_ARCH_HAS_SA_RESTORER 1 -#define TARGET_ARCH_HAS_KA_RESTORER 1 -#elif defined(TARGET_MIPS) +#if defined(TARGET_MIPS) #define TARGET_SA_NOCLDSTOP 0x00000001 #define TARGET_SA_NOCLDWAIT 0x00010000 #define TARGET_SA_SIGINFO 0x00000008 @@ -518,46 +508,6 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SIG_UNBLOCK 2 #define TARGET_SIG_SETMASK 3 -#elif defined(TARGET_SPARC) - -#define TARGET_SIGHUP 1 -#define TARGET_SIGINT 2 -#define TARGET_SIGQUIT 3 -#define TARGET_SIGILL 4 -#define TARGET_SIGTRAP 5 -#define TARGET_SIGABRT 6 -#define TARGET_SIGIOT 6 -#define TARGET_SIGSTKFLT 7 /* actually EMT */ -#define TARGET_SIGFPE 8 -#define TARGET_SIGKILL 9 -#define TARGET_SIGBUS 10 -#define TARGET_SIGSEGV 11 -#define TARGET_SIGSYS 12 -#define TARGET_SIGPIPE 13 -#define TARGET_SIGALRM 14 -#define TARGET_SIGTERM 15 -#define TARGET_SIGURG 16 -#define TARGET_SIGSTOP 17 -#define TARGET_SIGTSTP 18 -#define TARGET_SIGCONT 19 -#define TARGET_SIGCHLD 20 -#define TARGET_SIGTTIN 21 -#define TARGET_SIGTTOU 22 -#define TARGET_SIGIO 23 -#define TARGET_SIGXCPU 24 -#define TARGET_SIGXFSZ 25 -#define TARGET_SIGVTALRM 26 -#define TARGET_SIGPROF 27 -#define TARGET_SIGWINCH 28 -#define TARGET_SIGPWR 29 -#define TARGET_SIGUSR1 30 -#define TARGET_SIGUSR2 31 -#define TARGET_SIGRTMIN 32 - -#define TARGET_SIG_BLOCK 0x01 /* for blocking signals */ -#define TARGET_SIG_UNBLOCK 0x02 /* for unblocking signals */ -#define TARGET_SIG_SETMASK 0x04 /* for setting the signal mask */ - #elif defined(TARGET_MIPS) #define TARGET_SIGHUP 1 /* Hangup (POSIX). */ From patchwork Mon Jun 4 15:20:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925102 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 40zzP852mbz9s08 for ; Tue, 5 Jun 2018 01:29:00 +1000 (AEST) Received: from localhost ([::1]:40378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrPm-0000vX-6q for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:28:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHu-0002Dq-Fj for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHs-00063y-Sr for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:50 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:38521) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHs-00062r-Hk for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:48 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LaNTf-1g9Ov337B1-00mMlc; Mon, 04 Jun 2018 17:20:39 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:11 +0200 Message-Id: <20180604152015.13359-14-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:pVRGFmwIMNML5H+bccePZlbuWLhpy+zFBqn6pCd5hTTUNGUKEmg UnQqkmcc4gIDhztUsa50U0zFsCyoovjh04cb2k/VZUcSQFbRekVIYD0hXkHwbKIFQg90VZu 14R1vzUCRD+3G70uEzfDevFjtnBaXavi6lAH6G+eLn+KYhdy8VF7UWFGMjcAlZvyHJ1zNDz wUK8WhJbl7awrt00L3Qig== X-UI-Out-Filterresults: notjunk:1; V01:K0:PAOwfOi5ads=:8k9XRr/PWc/QeNf3bkiGov rK0NbHOAZHleH/uioi7+aVJIV5uhFb+YxSW5HacyQrz5i8QiiZsQP7Y/Mu09jgsY/6/8JbEsj QVL5uH7eRC/31tm7cqjrcT0NAPhxEV90BAi1RcTyb9aC70Nn2TEUDSOMfmVVeZ+6Jsyp/3zxj n4HakyBzg3fGmW/ssLFaP7n6POYhmnKHHLe5Kk1Lez4232Y5ubM3YK6AdVd5QKZF1wVW8qZq4 pl/GfROj3uKGigH1pgZGsi7OJBwistM/YrTF2ecqTxY1TDgwQr+NjNhFGIQSDcjA8vVYObODH CTTtCQkgHdihAjoXLK/yGPZ/MhIuxzGfrXGyC/HcCkiV93KwgZhJ9a+ZLlQ6sBeItNpxE5LSQ N5ncv/BQDPsaMWL3nOHr8vj0TyvDfszNR8V+K3MT6FeuqMKsHfmnmLaftDP4PBLBwoW3k3NlF iS9iuzo1GA1LHOJybQqsX36VIY8rDQJn8NWZ0MNFeTXLGlLCs61f3OE51nAu2X91MHX3juEjX YcwpdDGoTrb17abgzDRbT5RzTuA1lIIyU3vv+YWEPCYxsIUm1mKCsWDGfyb6+hHgD1hx+jIu2 lR7ysoDb8bMQFocsse0O5TRKU+JVfYvuJO6IVKPFp94Hrg3CoBu+ABJ12ilgbj7r5F6qPbeDW TDHeIfFOn3u+rIgW8khH7yLYmQ/YJjhzwhyZHKj1Ii7d+hQY2CF7F0O+Q0PwdSrrmTI8= 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] [PULL 13/17] 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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-12-laurent@vivier.eu> --- 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 From patchwork Mon Jun 4 15:20:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925106 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 40zzSL4sP7z9s08 for ; Tue, 5 Jun 2018 01:31:46 +1000 (AEST) Received: from localhost ([::1]:40396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrSS-0003My-9N for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:31:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHt-0002D0-SR for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHs-000643-Rf for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:49 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:44725) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHs-00062M-I1 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:48 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MgUqY-1fcQan1opy-00NgAz; Mon, 04 Jun 2018 17:20:39 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:12 +0200 Message-Id: <20180604152015.13359-15-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:ODJ1xP6Ki3dE5y55OO9A3pkan6ZI5RexhJsiXcbWpUL4MQ1EtON s8mYO2a28kjsZN5HVMw9PZuiPd3qn1ARiO24LFS4QEaayp36TKj8190ePcYJsq8pOPW6UDh js8FJvdnY2m/DwZGnB7BaKpMa3iPyr5l5oD/P+CkmQ8NAFH400ztc4ZP3PGIGHfJ8/2WgyR SXSE+qhnpvTizaurAv0Sg== X-UI-Out-Filterresults: notjunk:1; V01:K0:6PGNH/xh+bY=:D1OwOZULpXHTkWRXYznnvf eMpznu/RzKYxZG/Tz9mBcXxZ7T23qXLlQgALpMbS7K8eRRtKfNIZxCqdXEOpVPt37mqOVk+Ey xxPkWdZY3WJBL19rDcY2dif9gztLqh4xvV8VIFBKR0wjeYc/arN38BoVeAWQbBHmisGXdZC/1 rWoMBlUpQz8X88yMg+A9nYW1HQJl5NfouiUdf6FLdi1hl1lBm9bapVeR78rjCjDFxCgF5CBhY Dze3DVNGRLDM6i0Q0/AzV+lRWYNF/Ce3aCjozLMTkJIpmp88KhWRr7pn97tLbJEbejWfIRd9F FgL2kkTpzytGa8FqIj9xBtss76V07g78FUOQMpAbqmuYfMX6ULB0sR6g+GkdcHDyL8eZRjshd RGJXeKUbJmZ8+FlkC3WT/XUxQBO0urDXIJDKmnlWXNYcWoEDND/zOnfFQAIibXaFBQA5/6LPq ED/PHZTPjc7oJTDb6HirodUrdtgsQ+NmwgaCL385Rp0vx843zLR/w0enumuD26qp9jKq/hfhR hToeAOvksmVEHzg+9yf8oKGAxTkSpxuslE7V403w5ECqB9zDB4hCEglFk0PnnTMMfmSlifZ+G eiMDp/mcSCVyVXevKKHCMKMsywGwI58rnBrhsV8zTE5JedKx/OQxyvIsyezR1/uFtSVZZupge S6MaoTAnVZCBDMtTGdr9s+KHUmqZvFDK4s7YrBF+t3iInA/O/W2yB5U17OSoXUUB2qOw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL 14/17] linux-user: move openrisc signal definitions to openrisc/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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-13-laurent@vivier.eu> --- linux-user/openrisc/target_signal.h | 8 ++++++++ linux-user/syscall_defs.h | 10 +--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/target_signal.h index 3ccbb974d9..c352a8b333 100644 --- a/linux-user/openrisc/target_signal.h +++ b/linux-user/openrisc/target_signal.h @@ -13,6 +13,14 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 +#define TARGET_SA_NOCLDSTOP 0x00000001 +#define TARGET_SA_NOCLDWAIT 0x00000002 +#define TARGET_SA_SIGINFO 0x00000004 +#define TARGET_SA_ONSTACK 0x08000000 +#define TARGET_SA_RESTART 0x10000000 +#define TARGET_SA_NODEFER 0x40000000 +#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 21d3ef5559..360d37c9c0 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -426,15 +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_OPENRISC) -#define TARGET_SA_NOCLDSTOP 0x00000001 -#define TARGET_SA_NOCLDWAIT 0x00000002 -#define TARGET_SA_SIGINFO 0x00000004 -#define TARGET_SA_ONSTACK 0x08000000 -#define TARGET_SA_RESTART 0x10000000 -#define TARGET_SA_NODEFER 0x40000000 -#define TARGET_SA_RESETHAND 0x80000000 -#elif defined(TARGET_ALPHA) +#if defined(TARGET_ALPHA) #define TARGET_SA_ONSTACK 0x00000001 #define TARGET_SA_RESTART 0x00000002 #define TARGET_SA_NOCLDSTOP 0x00000004 From patchwork Mon Jun 4 15:20:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925107 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 40zzSZ5wRsz9s08 for ; Tue, 5 Jun 2018 01:31:58 +1000 (AEST) Received: from localhost ([::1]:40400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrSe-0003V1-Cm for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:31:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrI0-0002HZ-07 for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHw-0006Aa-Ed for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:55 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:44883) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHw-00068Y-1U for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MAo9v-1fbA5z01LH-00BvYS; Mon, 04 Jun 2018 17:20:40 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:13 +0200 Message-Id: <20180604152015.13359-16-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:mrP6PfwI7DHZLZ16sz+00PZAX4k63Q7h3gjdrKCbseNdFAqc4X2 AQpq49YFq1A+s5uGoW3pt8KDGlEhfuDdd/WIOoZzEttzLWcMmwTd8EDPmARQm8aLkx3PI1b 7e3KqpnFDwId+og+RuvqnqL3pRTPxUPmoH2KehtM7dwg7uyVnualK6PfXs+Tx2sg6g+FTSd rDGPhhuFnkxe6NUp4468g== X-UI-Out-Filterresults: notjunk:1; V01:K0:nXLaoA4UK9U=:34kTzJzHiNA3okIOx+907X l3/nloJEhSRregJ4F0bKXvBArsSI4vQ26VZY17May+oiATAQxwcF88VYJo7WXZVx0HeeXXbw0 wx/0cZzcLPobhZqLBVwSeo/wHcd/RYqOL2kUh9Bt0MAzReB+Wvhy/FZSrRY9K6RadCod/2vze SiSgCFk5jr5kDtufm9PYIJ68+Vc5wNeiXoOMPbigUYh4Mfl1qe0TYSNNjW/OfbBBsnl3+Y0lL ApipHgLa25IX0y7MVJH/jRqFc1tHB/vfdxKcYWc0uQiMkz+JSBipJlxH7xfNNciVF450UG0DE crYVa8DpOt1/bZVkfwrgZtZOdfA/VUUNG1XsuY7g0nBMbUEea5ciMerj2thN2KgkP6hf2tyjo X/5jz6Pj4FUZ/cpTGiWIqQEj5t5F+ktHpwE2APcps2Rtdf2kD/RPZ2jEfq5Hc8T5DGEzIefC+ arhSi+wSGW4SjPCPwjL6NnAQCqxarfe04kdKlWk6lQt3/oOjAIr0vw+AKbhb9VaMwcSrUQ6UK d87VJOSJHFI7VIXQtx0yY0IY7J4Dfm2mc72xWQs2A1VDtYkfpz86FKLs+NkMzFsbwBYDod3W+ +aKp4MlDSH4l03p9trxmEtZYWEMY2I4rfYfVdFj4T9VBHnDwC3yhVH6F+OvQDwyu73eumIruv GxMIXQX2zHWPz6MY3pp4OMjJUVVoZvVKKfv7dycvwAZVMNV79NvSkVO6YvzPm3jP8Bqc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.133 Subject: [Qemu-devel] [PULL 15/17] linux-user: move alpha signal definitions to alpha/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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-14-laurent@vivier.eu> --- linux-user/alpha/target_signal.h | 45 +++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 51 ++-------------------------------------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/linux-user/alpha/target_signal.h b/linux-user/alpha/target_signal.h index e6f2f04911..cd63d59fde 100644 --- a/linux-user/alpha/target_signal.h +++ b/linux-user/alpha/target_signal.h @@ -1,6 +1,43 @@ #ifndef ALPHA_TARGET_SIGNAL_H #define ALPHA_TARGET_SIGNAL_H +#define TARGET_SIGHUP 1 +#define TARGET_SIGINT 2 +#define TARGET_SIGQUIT 3 +#define TARGET_SIGILL 4 +#define TARGET_SIGTRAP 5 +#define TARGET_SIGABRT 6 +#define TARGET_SIGSTKFLT 7 /* actually SIGEMT */ +#define TARGET_SIGFPE 8 +#define TARGET_SIGKILL 9 +#define TARGET_SIGBUS 10 +#define TARGET_SIGSEGV 11 +#define TARGET_SIGSYS 12 +#define TARGET_SIGPIPE 13 +#define TARGET_SIGALRM 14 +#define TARGET_SIGTERM 15 +#define TARGET_SIGURG 16 +#define TARGET_SIGSTOP 17 +#define TARGET_SIGTSTP 18 +#define TARGET_SIGCONT 19 +#define TARGET_SIGCHLD 20 +#define TARGET_SIGTTIN 21 +#define TARGET_SIGTTOU 22 +#define TARGET_SIGIO 23 +#define TARGET_SIGXCPU 24 +#define TARGET_SIGXFSZ 25 +#define TARGET_SIGVTALRM 26 +#define TARGET_SIGPROF 27 +#define TARGET_SIGWINCH 28 +#define TARGET_SIGPWR 29 /* actually SIGINFO */ +#define TARGET_SIGUSR1 30 +#define TARGET_SIGUSR2 31 +#define TARGET_SIGRTMIN 32 + +#define TARGET_SIG_BLOCK 1 +#define TARGET_SIG_UNBLOCK 2 +#define TARGET_SIG_SETMASK 3 + /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -17,6 +54,14 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 +#define TARGET_SA_ONSTACK 0x00000001 +#define TARGET_SA_RESTART 0x00000002 +#define TARGET_SA_NOCLDSTOP 0x00000004 +#define TARGET_SA_NODEFER 0x00000008 +#define TARGET_SA_RESETHAND 0x00000010 +#define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */ +#define TARGET_SA_SIGINFO 0x00000040 + #define TARGET_MINSIGSTKSZ 4096 #define TARGET_SIGSTKSZ 16384 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 360d37c9c0..8436875005 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -426,15 +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_ALPHA) -#define TARGET_SA_ONSTACK 0x00000001 -#define TARGET_SA_RESTART 0x00000002 -#define TARGET_SA_NOCLDSTOP 0x00000004 -#define TARGET_SA_NODEFER 0x00000008 -#define TARGET_SA_RESETHAND 0x00000010 -#define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */ -#define TARGET_SA_SIGINFO 0x00000040 -#elif defined(TARGET_HPPA) +#if defined(TARGET_HPPA) #define TARGET_SA_ONSTACK 0x00000001 #define TARGET_SA_RESETHAND 0x00000004 #define TARGET_SA_NOCLDSTOP 0x00000008 @@ -450,46 +442,7 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_ARCH_HAS_SA_RESTORER 1 #endif -#if defined(TARGET_ALPHA) - -#define TARGET_SIGHUP 1 -#define TARGET_SIGINT 2 -#define TARGET_SIGQUIT 3 -#define TARGET_SIGILL 4 -#define TARGET_SIGTRAP 5 -#define TARGET_SIGABRT 6 -#define TARGET_SIGSTKFLT 7 /* actually SIGEMT */ -#define TARGET_SIGFPE 8 -#define TARGET_SIGKILL 9 -#define TARGET_SIGBUS 10 -#define TARGET_SIGSEGV 11 -#define TARGET_SIGSYS 12 -#define TARGET_SIGPIPE 13 -#define TARGET_SIGALRM 14 -#define TARGET_SIGTERM 15 -#define TARGET_SIGURG 16 -#define TARGET_SIGSTOP 17 -#define TARGET_SIGTSTP 18 -#define TARGET_SIGCONT 19 -#define TARGET_SIGCHLD 20 -#define TARGET_SIGTTIN 21 -#define TARGET_SIGTTOU 22 -#define TARGET_SIGIO 23 -#define TARGET_SIGXCPU 24 -#define TARGET_SIGXFSZ 25 -#define TARGET_SIGVTALRM 26 -#define TARGET_SIGPROF 27 -#define TARGET_SIGWINCH 28 -#define TARGET_SIGPWR 29 /* actually SIGINFO */ -#define TARGET_SIGUSR1 30 -#define TARGET_SIGUSR2 31 -#define TARGET_SIGRTMIN 32 - -#define TARGET_SIG_BLOCK 1 -#define TARGET_SIG_UNBLOCK 2 -#define TARGET_SIG_SETMASK 3 - -#elif defined(TARGET_HPPA) +#if defined(TARGET_HPPA) #define TARGET_SIGHUP 1 #define TARGET_SIGINT 2 From patchwork Mon Jun 4 15:20:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925104 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 40zzPJ6VVFz9s0w for ; Tue, 5 Jun 2018 01:29:08 +1000 (AEST) Received: from localhost ([::1]:40381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrPu-00013X-IU for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:29:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHy-0002Gx-3P for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHw-0006BD-QI for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:54 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:41047) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHw-000699-HI for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MgUqY-1fcQb02TOY-00NgAz; Mon, 04 Jun 2018 17:20:40 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:14 +0200 Message-Id: <20180604152015.13359-17-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:Lohassu2exYeI1Rg+ywlhH0dg6UBBqjMpMbgLSHzWjRErnpFA+b XyX93eOJTUsMEbN8ala565SP0sUY6J4tWBq2Pg9CNTTVBQmkCZzuf5Q77MmigX42nHvpgll NDI1UNomFiF7VwnTzP3BFNVXy0X80DrxsrIxYaDlDG0hBT4tMxz7Rqw8ipwb/N3yDfnom95 FwayamWif2OIDHtQHCOJQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:c1dzaHPTL4c=:09a6LGJe9Z3jodkoroMi58 OBSfJBvQBHvVuCtuUVJyo+f51qGBHFJYdTrFaTfSlAHvEoZrT2iTgocVzspctk0b4zwi6XzRQ OpIgYtmIeJMZw8ExSc4x8YGw0Fzo4MA4/nsZALi3gqYV9tt48bLFdky0Ml6uzHzaBZd34rRje P3qJpt+OX/VvzIqN1BX9Lo/cSHEklo4h5mBNoB/u8kJ4lPQ+HEVdOVVRob1J7Zh4BghbKNs/v /SXQHBx0bRCPwl54dG0hDGTYF6tUUWoFPY1RTLAMTLdrMgN31mUUgoP3h35qx48Lln6w5aqw7 jhyhFdDJUDvegI3f0jK0D+V5ibvAHcNBZWWSq9JOpR7iVnqllRkRc2pUtuHEnWcXdF5YVxhLW vke/LBcOIiWFeSYS2DaYvPb92lhHiTCMYpUnFZ6H59ZmJZ20ssdrCRX72GNbQvF6rzFVodNdz M6UfJtIcKIiGefNEDx0XqVg/83br2N3am2vFJsHAYU97bJvq+inn2DywzlDAxxu4g0FMYOGh4 5AitzQ/KCxQ0DZx9J9A+sFD3bpBAAP0Xc5PPJzdLOeWi38QXp6yCiJZPCWfOpIJonkTS5dZGq fNhWKtqLe0e9VuK9I5U+f6vlAcR5euB0pTFRLAU0RvFxRtCXWmUfyTonXLQzeqNetcrt1zZI2 SUW9+D8kNDhfMqLoaJbiPngluKpJJIw89/FzAVH0hkRqLlYZ8PlD0n1nOF/SV2/bcc8k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL 16/17] linux-user: move hppa signal definitions to hppa/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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" No code change. Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-15-laurent@vivier.eu> --- linux-user/hppa/target_signal.h | 46 ++++++++++++++++++++++++++++++++++++ linux-user/syscall_defs.h | 52 ----------------------------------------- 2 files changed, 46 insertions(+), 52 deletions(-) diff --git a/linux-user/hppa/target_signal.h b/linux-user/hppa/target_signal.h index 1beae6485a..ba159ff8d0 100644 --- a/linux-user/hppa/target_signal.h +++ b/linux-user/hppa/target_signal.h @@ -1,6 +1,44 @@ #ifndef HPPA_TARGET_SIGNAL_H #define HPPA_TARGET_SIGNAL_H +#define TARGET_SIGHUP 1 +#define TARGET_SIGINT 2 +#define TARGET_SIGQUIT 3 +#define TARGET_SIGILL 4 +#define TARGET_SIGTRAP 5 +#define TARGET_SIGABRT 6 +#define TARGET_SIGIOT 6 +#define TARGET_SIGSTKFLT 7 +#define TARGET_SIGFPE 8 +#define TARGET_SIGKILL 9 +#define TARGET_SIGBUS 10 +#define TARGET_SIGSEGV 11 +#define TARGET_SIGXCPU 12 +#define TARGET_SIGPIPE 13 +#define TARGET_SIGALRM 14 +#define TARGET_SIGTERM 15 +#define TARGET_SIGUSR1 16 +#define TARGET_SIGUSR2 17 +#define TARGET_SIGCHLD 18 +#define TARGET_SIGPWR 19 +#define TARGET_SIGVTALRM 20 +#define TARGET_SIGPROF 21 +#define TARGET_SIGIO 22 +#define TARGET_SIGPOLL TARGET_SIGIO +#define TARGET_SIGWINCH 23 +#define TARGET_SIGSTOP 24 +#define TARGET_SIGTSTP 25 +#define TARGET_SIGCONT 26 +#define TARGET_SIGTTIN 27 +#define TARGET_SIGTTOU 28 +#define TARGET_SIGURG 29 +#define TARGET_SIGXFSZ 30 +#define TARGET_SIGSYS 31 + +#define TARGET_SIG_BLOCK 0 +#define TARGET_SIG_UNBLOCK 1 +#define TARGET_SIG_SETMASK 2 + /* this struct defines a stack used during syscall handling */ typedef struct target_sigaltstack { @@ -16,6 +54,14 @@ typedef struct target_sigaltstack { #define TARGET_SS_ONSTACK 1 #define TARGET_SS_DISABLE 2 +#define TARGET_SA_ONSTACK 0x00000001 +#define TARGET_SA_RESETHAND 0x00000004 +#define TARGET_SA_NOCLDSTOP 0x00000008 +#define TARGET_SA_SIGINFO 0x00000010 +#define TARGET_SA_NODEFER 0x00000020 +#define TARGET_SA_RESTART 0x00000040 +#define TARGET_SA_NOCLDWAIT 0x00000080 + #define TARGET_MINSIGSTKSZ 2048 #define TARGET_SIGSTKSZ 8192 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 8436875005..e2896ae1b3 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -426,64 +426,12 @@ 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_HPPA) -#define TARGET_SA_ONSTACK 0x00000001 -#define TARGET_SA_RESETHAND 0x00000004 -#define TARGET_SA_NOCLDSTOP 0x00000008 -#define TARGET_SA_SIGINFO 0x00000010 -#define TARGET_SA_NODEFER 0x00000020 -#define TARGET_SA_RESTART 0x00000040 -#define TARGET_SA_NOCLDWAIT 0x00000080 -#endif - #include "target_signal.h" #ifdef TARGET_SA_RESTORER #define TARGET_ARCH_HAS_SA_RESTORER 1 #endif -#if defined(TARGET_HPPA) - -#define TARGET_SIGHUP 1 -#define TARGET_SIGINT 2 -#define TARGET_SIGQUIT 3 -#define TARGET_SIGILL 4 -#define TARGET_SIGTRAP 5 -#define TARGET_SIGABRT 6 -#define TARGET_SIGIOT 6 -#define TARGET_SIGSTKFLT 7 -#define TARGET_SIGFPE 8 -#define TARGET_SIGKILL 9 -#define TARGET_SIGBUS 10 -#define TARGET_SIGSEGV 11 -#define TARGET_SIGXCPU 12 -#define TARGET_SIGPIPE 13 -#define TARGET_SIGALRM 14 -#define TARGET_SIGTERM 15 -#define TARGET_SIGUSR1 16 -#define TARGET_SIGUSR2 17 -#define TARGET_SIGCHLD 18 -#define TARGET_SIGPWR 19 -#define TARGET_SIGVTALRM 20 -#define TARGET_SIGPROF 21 -#define TARGET_SIGIO 22 -#define TARGET_SIGPOLL TARGET_SIGIO -#define TARGET_SIGWINCH 23 -#define TARGET_SIGSTOP 24 -#define TARGET_SIGTSTP 25 -#define TARGET_SIGCONT 26 -#define TARGET_SIGTTIN 27 -#define TARGET_SIGTTOU 28 -#define TARGET_SIGURG 29 -#define TARGET_SIGXFSZ 30 -#define TARGET_SIGSYS 31 - -#define TARGET_SIG_BLOCK 0 -#define TARGET_SIG_UNBLOCK 1 -#define TARGET_SIG_SETMASK 2 - -#endif - #if defined(TARGET_ALPHA) struct target_old_sigaction { abi_ulong _sa_handler; From patchwork Mon Jun 4 15:20:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 925113 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 40zzbl05Xnz9ry1 for ; Tue, 5 Jun 2018 01:38:10 +1000 (AEST) Received: from localhost ([::1]:40431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrYe-0008Ri-Fl for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2018 11:38:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPrHw-0002Fq-CN for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPrHu-00066I-3Z for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:52 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57449) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPrHt-00064Q-QA for qemu-devel@nongnu.org; Mon, 04 Jun 2018 11:20:50 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.167]) with ESMTPSA (Nemesis) id 0M4gBt-1gD7zQ0lLB-00yvnm; Mon, 04 Jun 2018 17:20:41 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2018 17:20:15 +0200 Message-Id: <20180604152015.13359-18-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180604152015.13359-1-laurent@vivier.eu> References: <20180604152015.13359-1-laurent@vivier.eu> X-Provags-ID: V03:K1:y4um54qoPKojklkArEzelYL+x3TZNSD782gO/4Ygips+rfAx2xG FNyC6S0G4Isi1Yt1IpJScehXyk00Hmcxy9mNhQ3QD6egnjzZTYEwMOL4p+cCrtO2v0JIaYq IuWCIGxaggWBPre3L+GRWr7rJKM4ALDCMFczGtsVpyHUwY0ThZ/zoo7LakEy3yOBnyEb4/A WXIveErwQKz902sXQcvpg== X-UI-Out-Filterresults: notjunk:1; V01:K0:VSrS/0FcsSQ=:1a5oOuQaWboTMwWO3X5/Ou dvvZK0DbMVhrJYkvFqQdqlv63Ibe4Ie18g4cOvhxF8LxzoI8qPVFl2+3YwVygBlvATHnbYH/G YSQzRY8boCJ9UhQ8IriooTvGMraYm/G1cVnLR/r7qPxndMyQcfywTOcvY22nI5jX2jmE+3tz7 RmDetVRS5SUernnvxy3fKhBU1pB7CJMR1ERBT39K7q0u5EjMuluinr2qJyGPeZ3y6ouFlb+E7 AHiIFedYgFibDB1xpa/T25k9/VRGPU1bnziyhHB3T4d2h+P1UFW5ccNJFm3/9zSjjfziKjexz epcsQ0nrjYD1tHlnxcnCpY8697Vm0gBY/MlPLIlF9egdreb9GsfTSPfttxvogy+GhbAY9AFIP M8yvYwfHJ6oKd/VXFnSqaDSacmZ9LctpT7LaIrygBv/Lsnfi3NqtlF5HYo6IRu4y2E0Sz+P6f HGxtWgoHvXIuLBxQ+Dg3XQ/EPO0T9SG4COq1mEXxgTTMCRMTfz2Nw5MUPmAzkkEoBDsWJU6Yp tTYVQkBiZmH0gXSgWe09i77xhX80SZ5WGwT1fchHEHQgPrw9Xo/rOIFk6BfxE2fhq4nG6jMy/ uIPAXGgKa41EZRftN4NOFxiaPuCJ/6M8S4bSrsKKmozd1DlFM+S+G4gvyqEmsX7AUuqHbxuS9 e2I6VkUK7MaRLQAEQM41kcB/Q4+M9AkPZ27R1jTTrreDWnr3Xvzoj0vH0HFfz0v9ZGT4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL 17/17] linux-user: remove useless #if 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 , Mark Cave-Ayland , Laurent Vivier , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Remove a "#if defined(XX) || defined(YY) || ..." with all available targets Signed-off-by: Laurent Vivier Message-Id: <20180529194207.31503-16-laurent@vivier.eu> --- linux-user/syscall_defs.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index e2896ae1b3..40bb60ef4c 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -418,14 +418,6 @@ struct target_sigaction; int do_sigaction(int sig, const struct target_sigaction *act, struct target_sigaction *oact); -#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \ - || defined(TARGET_PPC) || defined(TARGET_MIPS) || defined(TARGET_SH4) \ - || defined(TARGET_M68K) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) \ - || defined(TARGET_MICROBLAZE) \ - || defined(TARGET_S390X) || defined(TARGET_OPENRISC) \ - || defined(TARGET_TILEGX) || defined(TARGET_HPPA) || defined(TARGET_NIOS2) \ - || defined(TARGET_RISCV) || defined(TARGET_XTENSA) - #include "target_signal.h" #ifdef TARGET_SA_RESTORER @@ -666,8 +658,6 @@ typedef struct target_siginfo { #define TARGET_TRAP_BRANCH (3) /* process taken branch trap */ #define TARGET_TRAP_HWBKPT (4) /* hardware breakpoint/watchpoint */ -#endif /* defined(TARGET_I386) || defined(TARGET_ARM) */ - struct target_rlimit { abi_ulong rlim_cur; abi_ulong rlim_max;