[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/6] linux-user: Fix target_flock structure for MIPS
From: |
Laurent Vivier |
Subject: |
[Qemu-devel] [PULL 3/6] linux-user: Fix target_flock structure for MIPS O64 ABI |
Date: |
Tue, 2 Jul 2019 17:05:42 +0200 |
From: Aleksandar Markovic <address@hidden>
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 <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
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' */
--
2.21.0
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, Peter Maydell, 2019/07/01
- [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, Laurent Vivier, 2019/07/02
- [Qemu-devel] [PULL 1/6] linux-user: Add support for translation of statx() syscall, Laurent Vivier, 2019/07/02
- [Qemu-devel] [PULL 6/6] linux-user: move QEMU_IFLA_BR_MULTI_BOOLOPT to the good function, Laurent Vivier, 2019/07/02
- [Qemu-devel] [PULL 2/6] linux-user: Add support for strace for statx() syscall, Laurent Vivier, 2019/07/02
- [Qemu-devel] [PULL 5/6] linux-user: Handle EXCP_FPE properly for MIPS, Laurent Vivier, 2019/07/02
- [Qemu-devel] [PULL 4/6] linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK, Laurent Vivier, 2019/07/02
- [Qemu-devel] [PULL 3/6] linux-user: Fix target_flock structure for MIPS O64 ABI,
Laurent Vivier <=
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, no-reply, 2019/07/02
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, no-reply, 2019/07/02
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, no-reply, 2019/07/02
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, no-reply, 2019/07/02
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, no-reply, 2019/07/03
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, no-reply, 2019/07/03
- Re: [Qemu-devel] [PULL 0/6] Linux user for 4.1 patches, Peter Maydell, 2019/07/03