From patchwork Tue Jul 2 15:05:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1126351 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45dTX45RZcz9sNC for ; Wed, 3 Jul 2019 02:02:12 +1000 (AEST) Received: from localhost ([::1]:54798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiLEN-0007MD-OA for incoming@patchwork.ozlabs.org; Tue, 02 Jul 2019 12:02:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59660) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiKS3-0002aB-2n for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:12:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiKRz-0004Ez-7q for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:12:10 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:35063) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiKRv-0004AO-EW for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:12:05 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N3sRi-1ihxOo27SC-00zqfT; Tue, 02 Jul 2019 17:05:58 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 17:05:42 +0200 Message-Id: <20190702150545.1872-4-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190702150545.1872-1-laurent@vivier.eu> References: <20190702150545.1872-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Qh3lIEilbINRqqWJ8tE+vEEDPyShIUvBAe/hhcAzW3e4k3kKbCj 87phJebBmGvTWyozClUTP2zqQaHDnpVKn2eyWO8wF+u7KumW50MfnF7k8jjKOFzyX4frgJQ 0EFeh2IHk+fWfjiTk4sBpI4smwgEU3PFvPEZqEgnBXkAbZjlp9PNZsmu+5ilVYrpM3Gh7dd RgzMjDcNxSC/PFl3n5UVw== X-UI-Out-Filterresults: notjunk:1; V03:K0:zRoAzvmd5YQ=:S62X/HLjgnVFoPwdjUNBdI mV+0VGWRdbDkvdCNCtGa9CrSpPM31l8rP7napusIZaM23O0oW1Hlsmgbo775kMKRfTQHd/cu6 ea9YYXe2PntWcYJhHduJi3PFqh0HzPirEBH1Urh5MwwE8/4xP6LlXOUS8khlBn2kvn5rfs2c9 jCYLblGRzZi4t3KBYTrSQchJhD1ImeKQk7xox4ujWhs8NS24lJhCcZxXfu5mCRFD49SNPXH91 FJUL7FO+cf0SmgTOg9RuNjAH1Uok9L4WZzlNJchaq7tHykGpAg7DC7lD2d3r0xMG4tmJcUyS4 IEM/GLeaMcmsR5IpAnKZFzV2Supen0sYCzxbdZQZghLzW9BOM/7MTKIuVUu2ayYhoP2bbIqI2 C8qjBJVhDAlqEHyKp+M11y44JrQ60M6Tycv78waoHn9KcWQKp5+RRXPkYGLBAG7dKTniUggXG E6kLP2uUKYBTSo04MflRnMI72fq4CsjqdkSCs6sOW01YR5gAkcruojMOYKSc9nNTxRoq9wxNN WvV/YCmG9MailWkC+0NYlys9nIh+T46hNvXeu86/Xr3JqgMg/r3TDgSdw37ZaJK8J7hRSwMyB pAGoXW/N7zbRQBp7FA8BANkqLmxGNtCmTn3FtFCfOy8K26trxUD6dh8/l77b2SlXDonFLQtj/ iSttciOxzUrXeMwK86SXi+Lvkad2NdzgH2I7VnbZA8ouimPnLo71nHAO6Rc9fE1iuo/VFbyFJ 0eLn0xbxdYnTg7wLTT1NOVZSBPPnqEFWOXa+Jw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL 3/6] linux-user: Fix target_flock structure for MIPS O64 ABI X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dragan Mladjenovic , Aleksandar Rikalo , Riku Voipio , Laurent Vivier , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic Among MIPS ABIs, only MIPS O32 and N32 have special (different than other architectures) definition of structure flock in kernel. Bring target_flock definition in QEMU for MIPS O64 ABI to the correct state, which is currently different than the most common definition, and it should actually be the same. Reported-by: Dragan Mladjenovic Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier Message-Id: <1561718618-20218-4-git-send-email-aleksandar.markovic@rt-rk.com> Signed-off-by: Laurent Vivier --- linux-user/generic/fcntl.h | 2 +- linux-user/mips/target_fcntl.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h index a775a491e9e0..1b48ddeb99fe 100644 --- a/linux-user/generic/fcntl.h +++ b/linux-user/generic/fcntl.h @@ -129,7 +129,7 @@ struct target_flock { short l_whence; abi_long l_start; abi_long l_len; -#if defined(TARGET_MIPS) +#if defined(TARGET_MIPS) && (TARGET_ABI_BITS == 32) abi_long l_sysid; #endif int l_pid; diff --git a/linux-user/mips/target_fcntl.h b/linux-user/mips/target_fcntl.h index 000527cc955e..795bba754b5a 100644 --- a/linux-user/mips/target_fcntl.h +++ b/linux-user/mips/target_fcntl.h @@ -27,7 +27,11 @@ #define TARGET_F_SETOWN 24 /* for sockets. */ #define TARGET_F_GETOWN 23 /* for sockets. */ +#if (TARGET_ABI_BITS == 32) #define TARGET_ARCH_FLOCK_PAD abi_long pad[4]; +#else +#define TARGET_ARCH_FLOCK_PAD +#endif #define TARGET_ARCH_FLOCK64_PAD #define TARGET_F_GETLK64 33 /* using 'struct flock64' */