From patchwork Sat Mar 11 17:50:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9618907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C167604CC for ; Sat, 11 Mar 2017 17:50:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FEA028663 for ; Sat, 11 Mar 2017 17:50:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0191428736; Sat, 11 Mar 2017 17:50:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4BD0228663 for ; Sat, 11 Mar 2017 17:50:50 +0000 (UTC) Received: from localhost ([::1]:44244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmlAH-000059-BL for patchwork-qemu-devel@patchwork.kernel.org; Sat, 11 Mar 2017 12:50:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmlA7-000053-Jj for qemu-devel@nongnu.org; Sat, 11 Mar 2017 12:50:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmlA4-0003tq-HE for qemu-devel@nongnu.org; Sat, 11 Mar 2017 12:50:39 -0500 Received: from mout.gmx.net ([212.227.17.22]:55929) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmlA4-0003sY-8A for qemu-devel@nongnu.org; Sat, 11 Mar 2017 12:50:36 -0500 Received: from ls3530.fritz.box ([193.159.24.20]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MDR21-1d1HM31ltt-00GqIA; Sat, 11 Mar 2017 18:50:22 +0100 Date: Sat, 11 Mar 2017 18:50:19 +0100 From: Helge Deller To: qemu-devel@nongnu.org, Riku Voipio Message-ID: <20170311175019.GA7195@ls3530.fritz.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-Provags-ID: V03:K0:LxhjYN2KyC7PPY0JQtKT2FLV+/zXFac6PxCR0+kyzVoZzqiViY+ lw42rdtow3FpJ0PFFfTPrtoCX/ycoyYcXFtDKs0z3tG+o60SwB3mSJG7gwbMEVnGfuQWD+s bNtPb7A/FOEnk8vEGxTGWajvdt64dSmwur0gHLMB6rTFVcD2UGLnBg1Yh2kj7iYuGKB/jzl 0R80F0/jsNBVlF+jSKODw== X-UI-Out-Filterresults: notjunk:1; V01:K0:eStk6jOu+p8=:uD/vEMLVz7Vj92xNVXoc7H duy1DHCpGMUOmrRzHf1R+fnKHY3q0xzySC9V5/ij9I6O1stE76kMt/sU+eNKes2jOuwitxQf/ cvDhmjmJzo1e3n/CepHOJ9rFn3ZmDvE7FH7hxsKBXKL73ycHYtb3o5JqOHZoGf4jQLm2NwxS8 z1L71XXu88IQRxFIWfjLb2KtmOEKWYjHasRHOL/bGRR1BwFzZaSRcbMd+xMj2hqN7u2BKgSur FY14ql29PkzAU/dwjBeIs4Sbyw/pxnh9ZPcpLno3HrMMe+5tEC023EkDQxaWB3ho/fuPmenoD Py+AU21lc01BtgQxzc0ZfzkrpVhmVY0wpYSudRZBdF0mFfQWpX4V2823fQVcbiKk3IxNNNTGs KNI7wzCR6GjnfPn9X7PGdy46sR5ZPsAAIrKwJY/XRj1yslMVNEXRb7iZoIpgvNVI29pUTqlEA jJqG47IoSpaAJhWLxld4uWTvwA5GQdP27xAik1z0iwfrTlKHLLDNyO24O3OzpbnbkTjsjG7ka wnYkGDkh2lZIz8ssAglTgbqRnGDymrtTtMQhwEbWyR62cs+Y8I68F4wxaCj26QxTtqecgsFoM w4bOj28VLr8ZHDuJdLAjA43yEjBW7qy6CBBe+4G2p6uCwTUSenvTBNknTudW5qR5lLlwv+zIF OKiNgC7R+Q09hopIPzbx+nB9q7DDwnMGJhvnUHldB2GA4jBnqQ5El7BkWmtDMLJaU2CSjfTh5 FyuhhiHQ6g7HTHzwy5vRaxmWo6Kunz1qhh0uhL5YOyVY3xQCHjUC7JCYjRU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.22 Subject: [Qemu-devel] [PATCH] linux-user: Fix TARGET_MAP* and TARGET_F_??LCK for hppa arch 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: Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP TARGET_MAP_TYPE needs to be 0x03 instead of 0x0f on the hppa architecture, otherwise it conflicts with MAP_FIXED which is 0x04. Add missing TARGET_MAP_STACK and TARGET_MAP_HUGETLB values. Fix TARGET_F_RDLCK, TARGET_F_WRLCK and TARGET_F_UNLCK. Signed-off-by: Helge Deller diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 2620b56..f356189 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1329,7 +1329,11 @@ struct target_winsize { /* Common */ #define TARGET_MAP_SHARED 0x01 /* Share changes */ #define TARGET_MAP_PRIVATE 0x02 /* Changes are private */ +#if defined(TARGET_HPPA) +#define TARGET_MAP_TYPE 0x03 /* Mask for type of mapping */ +#else #define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ +#endif /* Target specific */ #if defined(TARGET_MIPS) @@ -1372,6 +1376,8 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x04000 /* no check for reservations */ #define TARGET_MAP_POPULATE 0x10000 /* pop (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */ +#define TARGET_MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */ +#define TARGET_MAP_HUGETLB 0x80000 /* create a huge page mapping */ #else #define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ #define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ @@ -2350,6 +2356,9 @@ struct target_statfs64 { #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