All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: lvivier@redhat.com, amarkovic@wavecomp.com
Subject: [Qemu-devel] [PATCH v11 5/5] linux-user: Fix flock structure for MIPS O64 ABI
Date: Wed, 19 Jun 2019 16:10:29 +0200	[thread overview]
Message-ID: <1560953429-29203-6-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
In-Reply-To: <1560953429-29203-1-git-send-email-aleksandar.markovic@rt-rk.com>

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Only MIPS O32 and N32 have special (different than other
architectures) definition of structure flock in kernel.

Bring flock definition for MIPS O64 ABI to the correct state.

Reported-by: Dragan Mladjenovic <dmladjenovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
 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 a775a49..1b48dde 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 000527c..795bba7 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.7.4



  parent reply	other threads:[~2019-06-19 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 14:10 [Qemu-devel] [PATCH v11 0/5] linux-user: A set of miscellaneous patches Aleksandar Markovic
2019-06-19 14:10 ` [Qemu-devel] [PATCH v11 1/5] linux-user: Add support for setsockopt() options IPV6_<ADD|DROP>_MEMBERSHIP Aleksandar Markovic
2019-06-19 14:10 ` [Qemu-devel] [PATCH v11 2/5] linux-user: Add support for setsockopt() option SOL_ALG Aleksandar Markovic
2019-06-19 14:10 ` [Qemu-devel] [PATCH v11 3/5] linux-user: Add support for translation of statx() syscall Aleksandar Markovic
2019-06-19 14:10 ` [Qemu-devel] [PATCH v11 4/5] linux-user: Add support for strace for " Aleksandar Markovic
2019-06-19 14:10 ` Aleksandar Markovic [this message]
2019-06-19 14:21 ` [Qemu-devel] [PATCH v11 0/5] linux-user: A set of miscellaneous patches no-reply
2019-06-19 14:51 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1560953429-29203-6-git-send-email-aleksandar.markovic@rt-rk.com \
    --to=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.