From patchwork Thu May 23 14:43:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1104211 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=209.51.188.17; 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 [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 458syR3kKdz9s55 for ; Fri, 24 May 2019 00:56:15 +1000 (AEST) Received: from localhost ([127.0.0.1]:38248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTp8f-0004r6-IE for incoming@patchwork.ozlabs.org; Thu, 23 May 2019 10:56:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTox1-0004Lt-TZ for qemu-devel@nongnu.org; Thu, 23 May 2019 10:44:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTox0-0006Nl-K0 for qemu-devel@nongnu.org; Thu, 23 May 2019 10:44:11 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:38043) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTox0-0006Mw-AU for qemu-devel@nongnu.org; Thu, 23 May 2019 10:44:10 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MNtCi-1hIsj83vdQ-00OGcG; Thu, 23 May 2019 16:43:43 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 23 May 2019 16:43:29 +0200 Message-Id: <20190523144336.13960-4-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523144336.13960-1-laurent@vivier.eu> References: <20190523144336.13960-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:0MGJHVzNT2jKtASdGvmoFoDKkK64vgdE9rdE23Cw6YtvBUF6D5u W17UMI5/3ao0th2bQ3urJcuoanIc3kPtIdOs2eKC79zbO/bCUTvz9M8kz3nBNxYcfV6+6Sc gbjJlpesV9Il0DnH1Lb7H53dDw+sXJXjJhihMkgGr/KTpfo3Zw8kBQ8nePPnYJzZB9iJ1KG tk0lb072mijQOEBmtCqOA== X-UI-Out-Filterresults: notjunk:1; V03:K0:XzmyCqWuS/E=:Fy0LPrCu8bS4W8Q058SXBR rc1GJdhN2D4UdH0SNRb1Yf+GiW5tqMYu03m0YYk4LL4MEH2/yzTwIwN4CyxZhwSVzg8fb2yCs FpMQky4VKBPpxDu9Y/W2P5cGV7NHjlx1rXuVN4Kg8YVbWyE+tDV9u34spHUQ/q48jl64lWMjr BgCVTtGphpm1lrTozPz7puWtbuGjsmkH1e1vJ9NZFx1CItaEeLfx7ueN1WaVyS2LRD8WAILyj gnpMOaW0uhYacW6uHr8UOTNya4k0aUxYg8lFHlMmJx1e+FcsLtfrBh6f/gfi4JzubVOc3KZMG uWBa97UL8OKbV0ujubefMEZ27PuNIRyZvGEQInIKKWqHoh0HJvqvQx05SO56yuAJQoFpbzP09 FrFjQMZal3zBqqjOTXfNfele83QOneHayuLWBOeHCU/JuOM6H4E8/uPg67CdrjhrPHYdroisG NVG9IrX3OMtiiDAOJf/aPhl1Ql6XW6mTHt/KGiy1xupYQM1n9YVEcrlCYnXYTbZrUAiumVWct zxVibCDwT8XKvOqhmw488aECZ5lSrR3OGDu6f/um9vQL5lSek5f03geY2cJN6aslaJ23L6Kzz U2VmuGRnsG/eRiUoRe4u0/+XMlsuefdAcYuhzSNxbVkrchUtVVu4cNOguGMdcYODvquwlXZKl Mf7KILbHUiOG/6aNObvTHwfVqoMnBKQW1Vg1Haq5tDOUb1dpRgmK+1dtj53TY6Tw1GR1+dNHr DYBpNGWjDWNWokjnS8vFh6MzS9J4NiRBO1qL/w== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL 03/10] linux-user: Fix support for SIOCATMARK and SIOCGPGRP ioctls for xtensa 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: Aleksandar Rikalo , Riku Voipio , Laurent Vivier , Max Filippov , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic Fix support for the SIOCATMARK and SIOCGPGRP ioctls for xtensa by correcting corresponding macro definition. Values for TARGET_SIOCATMARK and TARGET_SIOCGPGRP are determined by Linux kernel. Following relevant lines (obtained by grep) are from the kernel source tree: arch/ia64/include/uapi/asm/sockios.h:#define SIOCATMARK 0x8905 arch/mips/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int) arch/parisc/include/uapi/asm/sockios.h:#define SIOCATMARK 0x8905 arch/sh/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int) arch/xtensa/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int) arch/alpha/include/uapi/asm/sockios.h:#define SIOCATMARK _IOR('s', 7, int) arch/sparc/include/uapi/asm/sockios.h:#define SIOCATMARK 0x8905 include/uapi/asm-generic/sockios.h:#define SIOCATMARK 0x8905 arch/ia64/include/uapi/asm/sockios.h:#define SIOCGPGRP 0x8904 arch/mips/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t) arch/parisc/include/uapi/asm/sockios.h:#define SIOCGPGRP 0x8904 arch/sh/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t) arch/xtensa/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t) arch/alpha/include/uapi/asm/sockios.h:#define SIOCGPGRP _IOR('s', 9, pid_t) arch/sparc/include/uapi/asm/sockios.h:#define SIOCGPGRP 0x8904 include/uapi/asm-generic/sockios.h:#define SIOCGPGRP 0x8904 It is visible from above that xtensa should have the same definitions as alpha, mips and sh4 already do. This patch brings QEMU to the accurate state wrt these two ioctls. Acked-by: Max Filippov Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier Message-Id: <1558282527-22183-2-git-send-email-aleksandar.markovic@rt-rk.com> Signed-off-by: Laurent Vivier --- linux-user/syscall_defs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 1f5b2d18dbea..5b530e04b8fd 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -737,7 +737,8 @@ struct target_pollfd { #define TARGET_KDSETLED 0x4B32 /* set led state [lights, not flags] */ #define TARGET_KDSIGACCEPT 0x4B4E -#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4) +#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4) || \ + defined(TARGET_XTENSA) #define TARGET_SIOCATMARK TARGET_IOR('s', 7, int) #define TARGET_SIOCGPGRP TARGET_IOR('s', 9, pid_t) #else