[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/27] linux-user/hexagon: Use generic target_stat64 structure
From: |
Laurent Vivier |
Subject: |
[PULL 02/27] linux-user/hexagon: Use generic target_stat64 structure |
Date: |
Thu, 6 Jan 2022 11:41:12 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Linux Hexagon port doesn't define a specific 'struct stat'
but uses the generic one (see Linux commit 6103ec56c65c [*]
"asm-generic: add generic ABI headers" which predates the
introduction of the Hexagon port).
Remove the target specific target_stat (which in fact is the
target_stat64 structure but uses incorrect target_long and
ABI unsafe long long types) and use the generic target_stat64
instead.
[*]
https://github.com/torvalds/linux/commit/6103ec56c65c3#diff-5f59b07b38273b7d6a74193bc81a8cd18928c688276eae20cb10c569de3253ee
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20211116210919.2823206-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall_defs.h | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 0b139759377b..585e933140ac 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2133,7 +2133,8 @@ struct target_stat64 {
abi_ulong __unused5;
};
-#elif defined(TARGET_OPENRISC) || defined(TARGET_NIOS2) ||
defined(TARGET_RISCV)
+#elif defined(TARGET_OPENRISC) || defined(TARGET_NIOS2) \
+ || defined(TARGET_RISCV) || defined(TARGET_HEXAGON)
/* These are the asm-generic versions of the stat and stat64 structures */
@@ -2244,31 +2245,6 @@ struct target_stat64 {
uint64_t st_ino;
};
-#elif defined(TARGET_HEXAGON)
-
-struct target_stat {
- unsigned long long st_dev;
- unsigned long long st_ino;
- unsigned int st_mode;
- unsigned int st_nlink;
- unsigned int st_uid;
- unsigned int st_gid;
- unsigned long long st_rdev;
- target_ulong __pad1;
- long long st_size;
- target_long st_blksize;
- int __pad2;
- long long st_blocks;
-
- target_long target_st_atime;
- target_long target_st_atime_nsec;
- target_long target_st_mtime;
- target_long target_st_mtime_nsec;
- target_long target_st_ctime;
- target_long target_st_ctime_nsec;
- int __unused[2];
-};
-
#else
#error unsupported CPU
#endif
--
2.33.1
- [PULL 14/27] linux-user: add sched_getattr support, (continued)
- [PULL 14/27] linux-user: add sched_getattr support, Laurent Vivier, 2022/01/06
- [PULL 01/27] qemu-binfmt-conf.sh: fix -F option, Laurent Vivier, 2022/01/06
- [PULL 12/27] target/sh4: Implement prctl_unalign_sigbus, Laurent Vivier, 2022/01/06
- [PULL 18/27] linux-user/nios2: Fixes for signal frame setup, Laurent Vivier, 2022/01/06
- [PULL 15/27] linux-user: call set/getscheduler set/getparam directly, Laurent Vivier, 2022/01/06
- [PULL 22/27] linux-user/nios2: Fix sigmask in setup_rt_frame, Laurent Vivier, 2022/01/06
- [PULL 26/27] linux-user: netlink: Add IFLA_VFINFO_LIST, Laurent Vivier, 2022/01/06
- [PULL 09/27] linux-user: Add code for PR_GET/SET_UNALIGN, Laurent Vivier, 2022/01/06
- [PULL 20/27] linux-user/nios2: Map a real kuser page, Laurent Vivier, 2022/01/06
- [PULL 02/27] linux-user/hexagon: Use generic target_stat64 structure,
Laurent Vivier <=
- [PULL 16/27] linux-user/syscall.c: fix missed flag for shared memory in open_self_maps, Laurent Vivier, 2022/01/06
- [PULL 27/27] linux-user: netlink: update IFLA_BRPORT entries, Laurent Vivier, 2022/01/06
- [PULL 07/27] linux-user: Split out do_prctl and subroutines, Laurent Vivier, 2022/01/06
- [PULL 25/27] linux-user: netlink: update IFLA entries, Laurent Vivier, 2022/01/06
- [PULL 21/27] linux-user/nios2: Fix EA vs PC confusion, Laurent Vivier, 2022/01/06
- [PULL 08/27] linux-user: Disable more prctl subcodes, Laurent Vivier, 2022/01/06
- [PULL 19/27] linux-user/elfload: Rename ARM_COMMPAGE to HI_COMMPAGE, Laurent Vivier, 2022/01/06
- [PULL 23/27] linux-user/nios2: Use set_sigmask in do_rt_sigreturn, Laurent Vivier, 2022/01/06
- [PULL 24/27] linux-user/syscall.c: malloc to g_try_malloc, Laurent Vivier, 2022/01/06
- [PULL 05/27] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ, Laurent Vivier, 2022/01/06