* [PATCH] linux-user/hexagon: Use generic target_stat64 structure
@ 2021-11-16 21:09 Philippe Mathieu-Daudé
2021-11-17 7:17 ` Richard Henderson
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-16 21:09 UTC (permalink / raw)
To: qemu-devel
Cc: Taylor Simpson, Richard Henderson, Laurent Vivier,
Philippe Mathieu-Daudé
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>
---
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 a5ce487dcc3..7ab612d163b 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2129,7 +2129,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 */
@@ -2240,31 +2241,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.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-11-16 21:09 [PATCH] linux-user/hexagon: Use generic target_stat64 structure Philippe Mathieu-Daudé
@ 2021-11-17 7:17 ` Richard Henderson
2021-11-17 8:23 ` Taylor Simpson
2021-12-06 14:21 ` Philippe Mathieu-Daudé
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2021-11-17 7:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Taylor Simpson, Laurent Vivier
On 11/16/21 10:09 PM, Philippe Mathieu-Daudé wrote:
> 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>
> ---
> linux-user/syscall_defs.h | 28 ++--------------------------
> 1 file changed, 2 insertions(+), 26 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-11-17 7:17 ` Richard Henderson
@ 2021-11-17 8:23 ` Taylor Simpson
0 siblings, 0 replies; 8+ messages in thread
From: Taylor Simpson @ 2021-11-17 8:23 UTC (permalink / raw)
To: Richard Henderson, Philippe Mathieu-Daudé, qemu-devel; +Cc: Laurent Vivier
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Wednesday, November 17, 2021 1:18 AM
> To: Philippe Mathieu-Daudé <f4bug@amsat.org>; qemu-devel@nongnu.org
> Cc: Laurent Vivier <laurent@vivier.eu>; Taylor Simpson
> <tsimpson@quicinc.com>
> Subject: Re: [PATCH] linux-user/hexagon: Use generic target_stat64
> structure
>
> On 11/16/21 10:09 PM, Philippe Mathieu-Daudé wrote:
> > 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-5f59b07
> > b38273b7d6a74193bc81a8cd18928c688276eae20cb10c569de3253ee
> >
> > Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> > ---
> > linux-user/syscall_defs.h | 28 ++--------------------------
> > 1 file changed, 2 insertions(+), 26 deletions(-)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-11-16 21:09 [PATCH] linux-user/hexagon: Use generic target_stat64 structure Philippe Mathieu-Daudé
2021-11-17 7:17 ` Richard Henderson
@ 2021-12-06 14:21 ` Philippe Mathieu-Daudé
2021-12-06 14:26 ` Philippe Mathieu-Daudé
2021-12-15 10:36 ` Philippe Mathieu-Daudé
2021-12-19 16:04 ` Laurent Vivier
3 siblings, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-06 14:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Taylor Simpson, Richard Henderson, Laurent Vivier
Hi Laurent,
What is your plan for this patch? Technically this is a bugfix.
On 11/16/21 22:09, Philippe Mathieu-Daudé wrote:
> 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>
> ---
> 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 a5ce487dcc3..7ab612d163b 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2129,7 +2129,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 */
>
> @@ -2240,31 +2241,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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-12-06 14:21 ` Philippe Mathieu-Daudé
@ 2021-12-06 14:26 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-06 14:26 UTC (permalink / raw)
To: qemu-devel@nongnu.org Developers
Cc: Taylor Simpson, Richard Henderson, Laurent Vivier
On Mon, Dec 6, 2021 at 3:21 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Hi Laurent,
>
> What is your plan for this patch? Technically this is a bugfix.
I see the code was released for 6.0, so not a regression. Probably 7.0
material now.
> On 11/16/21 22:09, Philippe Mathieu-Daudé wrote:
> > 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>
> > ---
> > 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 a5ce487dcc3..7ab612d163b 100644
> > --- a/linux-user/syscall_defs.h
> > +++ b/linux-user/syscall_defs.h
> > @@ -2129,7 +2129,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 */
> >
> > @@ -2240,31 +2241,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
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-11-16 21:09 [PATCH] linux-user/hexagon: Use generic target_stat64 structure Philippe Mathieu-Daudé
2021-11-17 7:17 ` Richard Henderson
2021-12-06 14:21 ` Philippe Mathieu-Daudé
@ 2021-12-15 10:36 ` Philippe Mathieu-Daudé
2021-12-15 14:59 ` Taylor Simpson
2021-12-19 16:04 ` Laurent Vivier
3 siblings, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-15 10:36 UTC (permalink / raw)
To: qemu-devel; +Cc: Taylor Simpson, Richard Henderson, Laurent Vivier
ping.
On 11/16/21 22:09, Philippe Mathieu-Daudé wrote:
> 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>
> ---
> 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 a5ce487dcc3..7ab612d163b 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2129,7 +2129,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 */
>
> @@ -2240,31 +2241,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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-12-15 10:36 ` Philippe Mathieu-Daudé
@ 2021-12-15 14:59 ` Taylor Simpson
0 siblings, 0 replies; 8+ messages in thread
From: Taylor Simpson @ 2021-12-15 14:59 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Richard Henderson, Laurent Vivier
> -----Original Message-----
> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On
> Behalf Of Philippe Mathieu-Daudé
> Sent: Wednesday, December 15, 2021 4:36 AM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>; Richard Henderson
> <richard.henderson@linaro.org>; Laurent Vivier <laurent@vivier.eu>
> Subject: Re: [PATCH] linux-user/hexagon: Use generic target_stat64
> structure
>
> ping.
>
Sorry if my previous email didn't get through, but ...
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
2021-11-16 21:09 [PATCH] linux-user/hexagon: Use generic target_stat64 structure Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2021-12-15 10:36 ` Philippe Mathieu-Daudé
@ 2021-12-19 16:04 ` Laurent Vivier
3 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2021-12-19 16:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Taylor Simpson, Richard Henderson
Le 16/11/2021 à 22:09, Philippe Mathieu-Daudé a écrit :
> 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>
> ---
> 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 a5ce487dcc3..7ab612d163b 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2129,7 +2129,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 */
>
> @@ -2240,31 +2241,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
>
Applied to my linux-user-for-7.0 branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-12-19 16:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 21:09 [PATCH] linux-user/hexagon: Use generic target_stat64 structure Philippe Mathieu-Daudé
2021-11-17 7:17 ` Richard Henderson
2021-11-17 8:23 ` Taylor Simpson
2021-12-06 14:21 ` Philippe Mathieu-Daudé
2021-12-06 14:26 ` Philippe Mathieu-Daudé
2021-12-15 10:36 ` Philippe Mathieu-Daudé
2021-12-15 14:59 ` Taylor Simpson
2021-12-19 16:04 ` Laurent Vivier
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.