qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Taylor Simpson <tsimpson@quicinc.com>,
	Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure
Date: Sun, 19 Dec 2021 17:04:33 +0100	[thread overview]
Message-ID: <8b30a46e-7b1d-ee0f-02ef-f49dd844ed69@vivier.eu> (raw)
In-Reply-To: <20211116210919.2823206-1-f4bug@amsat.org>

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


      parent reply	other threads:[~2021-12-19 16:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=8b30a46e-7b1d-ee0f-02ef-f49dd844ed69@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=tsimpson@quicinc.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).