qemu-patch-raspberry4/linux-user
Aleksandar Markovic 1272a6c488 linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK
Bring target_flock definitions to be more in sync with the way
flock is defined in kernel.

Basically, the rules from the kernel are:

1. Majority of architectures have a common flock definition.

2. Architectures with 32-bit MIPS ABIs have a sligtly different
flock definition; those architectures are the only arcitectures
that have HAVE_ARCH_STRUCT_FLOCK defined, and that preprocessor
constant is used in the common header as a flag for including or
not including common flock definition.

3. Sparc architectures also have a sligtly different flock
definition, but the difference is only the padding at the end of
the structure. The presence of that padding is determined by
preprocessor constants __ARCH_FLOCK6_PAD and __ARCH_FLOCK64_PAD.

QEMU linux-user already implements rules 1. and 3. in a very
similar way as they are implemented in kernel. However, rule 2.
is implemented in a dissimilar way (for example, the constant
TARGET_HAVE_ARCH_STRUCT_FLOCK is missing), and this patch brings
QEMU implementation much closer to the kernel implementation.
TARGET_HAVE_ARCH_STRUCT_FLOCK64 constant is also introduced to
mimic HAVE_ARCH_STRUCT_FLOCK64 from kernel, but it is not defined
anywhere, however, this is the case with HAVE_ARCH_STRUCT_FLOCK64
in kernel as well.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1561718618-20218-5-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-07-02 16:56:46 +02:00
..
aarch64 Supply missing header guards 2019-06-12 13:20:21 +02:00
alpha Supply missing header guards 2019-06-12 13:20:21 +02:00
arm semihosting: split console_out into string and char versions 2019-06-12 17:53:22 +01:00
cris Supply missing header guards 2019-06-12 13:20:21 +02:00
generic linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK 2019-07-02 16:56:46 +02:00
host linux-user: Add safe_syscall for riscv64 host 2018-12-26 06:40:02 +11:00
hppa Supply missing header guards 2019-06-12 13:20:21 +02:00
i386 Supply missing header guards 2019-06-12 13:20:21 +02:00
m68k linux-user/m68k: remove simulator syscall interface 2019-06-26 17:14:41 +02:00
microblaze Supply missing header guards 2019-06-12 13:20:21 +02:00
mips linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK 2019-07-02 16:56:46 +02:00
mips64 Supply missing header guards 2019-06-12 13:20:21 +02:00
nios2 Supply missing header guards 2019-06-12 13:20:21 +02:00
openrisc Supply missing header guards 2019-06-12 13:20:21 +02:00
ppc linux-user: set default PPC64 CPU 2019-06-24 23:10:36 +02:00
riscv Supply missing header guards 2019-06-12 13:20:21 +02:00
s390x Supply missing header guards 2019-06-12 13:20:21 +02:00
sh4 Supply missing header guards 2019-06-12 13:20:21 +02:00
sparc Supply missing header guards 2019-06-12 13:20:21 +02:00
sparc64 Supply missing header guards 2019-06-12 13:20:21 +02:00
tilegx Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
x86_64 Supply missing header guards 2019-06-12 13:20:21 +02:00
xtensa Supply missing header guards 2019-06-12 13:20:21 +02:00
cpu_loop-common.h cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
elfload.c linux-user: update PPC64 HWCAP2 feature list 2019-06-24 23:10:07 +02:00
errno_defs.h Supply missing header guards 2019-06-12 13:20:21 +02:00
exit.c linux-user: fix GPROF build failure 2019-05-10 12:44:23 +02:00
fd-trans.c linux-user: add new netlink types 2019-03-07 11:02:33 +01:00
fd-trans.h linux-user: move TargetFdTrans functions to their own file 2018-09-25 22:36:47 +02:00
flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
flatload.c linux-user/flatload: fix initial stack pointer alignment 2018-10-30 11:23:32 -07:00
ioctls.h linux-user: Add support for SIOC<G|S>IFPFLAGS ioctls for all targets 2019-05-22 20:50:55 +02:00
linux_loop.h linux-user: Add loop control ioctls 2016-07-19 15:22:33 +03:00
linuxload.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
main.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
Makefile.objs linux-user/m68k: remove simulator syscall interface 2019-06-26 17:14:41 +02:00
mmap.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu.h linux-user/m68k: remove simulator syscall interface 2019-06-26 17:14:41 +02:00
safe-syscall.S linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
signal-common.h linux-user: introduce target_sigsp() and target_save_altstack() 2018-05-03 18:29:15 +02:00
signal.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
socket.h Supply missing header guards 2019-06-12 13:20:21 +02:00
strace.c linux-user: Add support for strace for statx() syscall 2019-07-02 16:56:46 +02:00
strace.list linux-user: Add support for strace for statx() syscall 2019-07-02 16:56:46 +02:00
syscall.c linux-user: Add support for translation of statx() syscall 2019-07-02 16:56:46 +02:00
syscall_defs.h linux-user: Add support for translation of statx() syscall 2019-07-02 16:56:46 +02:00
syscall_types.h linux-user: Implement special usbfs ioctls. 2018-10-19 14:05:10 +02:00
target_flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
uaccess.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
uname.c cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
uname.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vm86.c target/i386: Use env_cpu, env_archcpu 2019-06-10 07:03:42 -07:00