All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Chen Gang <xili_gchen_5257@hotmail.com>
Cc: "Riku Voipio" <riku.voipio@iki.fi>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Chris Metcalf" <cmetcalf@ezchip.com>,
	"walt@tilera.com" <walt@tilera.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 03/12 v9] linux-user: Support tilegx architecture in syscall
Date: Thu, 9 Apr 2015 22:38:30 +0100	[thread overview]
Message-ID: <CAFEAcA-MwBYFo8AyYWoO6Uk_TWqbPJyJXgDwubYyPyRsOJ1T=A@mail.gmail.com> (raw)
In-Reply-To: <BLU436-SMTP1479E0A695F390273A029FB9090@phx.gbl>

On 27 March 2015 at 10:50, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
> Add tilegx architecture in "syscall_defs.h", all related features (ioctrl,
> and stat) are based on Linux kernel tilegx 64-bit implementation.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  linux-user/syscall_defs.h | 38 ++++++++++++++++++++++++++++++++++----
>  1 file changed, 34 insertions(+), 4 deletions(-)
>
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index edd5f3c..023f4b5 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -64,8 +64,9 @@
>  #endif
>
>  #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4) \
> -    || defined(TARGET_M68K) || defined(TARGET_CRIS) || defined(TARGET_UNICORE32) \
> -    || defined(TARGET_S390X) || defined(TARGET_OPENRISC)
> +    || defined(TARGET_M68K) || defined(TARGET_CRIS) \
> +    || defined(TARGET_UNICORE32) || defined(TARGET_S390X) \
> +    || defined(TARGET_OPENRISC) || defined(TARGET_TILEGX)
>
>  #define TARGET_IOC_SIZEBITS    14
>  #define TARGET_IOC_DIRBITS     2
> @@ -365,7 +366,8 @@ int do_sigaction(int sig, const struct target_sigaction *act,
>      || defined(TARGET_PPC) || defined(TARGET_MIPS) || defined(TARGET_SH4) \
>      || defined(TARGET_M68K) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) \
>      || defined(TARGET_MICROBLAZE) || defined(TARGET_UNICORE32) \
> -    || defined(TARGET_S390X) || defined(TARGET_OPENRISC)
> +    || defined(TARGET_S390X) || defined(TARGET_OPENRISC) \
> +    || defined(TARGET_TILEGX)
>
>  #if defined(TARGET_SPARC)
>  #define TARGET_SA_NOCLDSTOP    8u
> @@ -1922,6 +1924,32 @@ struct target_stat64 {
>      unsigned int __unused5;
>  };
>
> +#elif defined(TARGET_TILEGX)
> +
> +/* Copy from Linux kernel "uapi/asm-generic/stat.h" */
> +struct target_stat {
> +        abi_ulong st_dev;               /* Device.  */
> +        abi_ulong st_ino;               /* File serial number.  */
> +        unsigned int st_mode;           /* File mode.  */
> +        unsigned int st_nlink;          /* Link count.  */
> +        unsigned int st_uid;            /* User ID of the file's owner.  */
> +        unsigned int st_gid;            /* Group ID of the file's group. */
> +        abi_ulong st_rdev;              /* Device number, if device.  */
> +        abi_ulong __pad1;
> +        abi_long  st_size;              /* Size of file, in bytes.  */
> +        int st_blksize;                 /* Optimal block size for I/O.  */
> +        int __pad2;
> +        abi_long st_blocks;             /* Number 512-byte blocks allocated. */
> +        abi_long target_st_atime;       /* Time of last access.  */
> +        abi_ulong target_st_atime_nsec;
> +        abi_long target_st_mtime;       /* Time of last modification.  */
> +        abi_ulong target_st_mtime_nsec;
> +        abi_long target_st_ctime;       /* Time of last status change.  */
> +        abi_ulong target_st_ctime_nsec;
> +        unsigned int __unused4;
> +        unsigned int __unused5;
> +};

We already have the generic stat struct for TARGET_OPENRISC,
so you should just add TILEGX to the #if for that. (Pretty
sure you want the stat64 struct too, or at least that it
won't hurt.)

-- PMM

  reply	other threads:[~2015-04-09 21:38 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <55153546.5060906@hotmail.com>
2015-03-27 10:48 ` [Qemu-devel] [PATCH 01/12 v9] linux-user: tilegx: Firstly add architecture related features Chen Gang
2015-04-09 21:21   ` Peter Maydell
2015-04-10 20:01     ` Chen Gang
2015-04-10 21:38       ` Peter Maydell
2015-04-11  2:39         ` Chen Gang
2015-03-27 10:49 ` [Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu Chen Gang
2015-04-09 21:31   ` Peter Maydell
2015-04-10 20:41     ` Chen Gang
2015-04-10 21:51       ` Peter Maydell
2015-04-10 21:59         ` Andreas Färber
2015-04-10 22:21           ` Peter Maydell
2015-04-11  3:37         ` Chen Gang
2015-03-27 10:50 ` [Qemu-devel] [PATCH 03/12 v9] linux-user: Support tilegx architecture in syscall Chen Gang
2015-04-09 21:38   ` Peter Maydell [this message]
2015-04-10 20:46     ` Chen Gang
2015-03-27 10:52 ` [Qemu-devel] [PATCH 04/12 v9] linux-user: Support tilegx architecture in linux-user Chen Gang
2015-04-09 21:44   ` Peter Maydell
2015-04-10 20:51     ` Chen Gang
2015-03-27 10:53 ` [Qemu-devel] [PATCH 05/12 v9] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx Chen Gang
2015-04-09 21:46   ` Peter Maydell
2015-04-10 20:57     ` Chen Gang
2015-03-27 10:54 ` [Qemu-devel] [PATCH 06/12 v9] target-tilegx: Add cpu basic features for linux-user Chen Gang
2015-04-09 21:55   ` Peter Maydell
2015-04-10 21:04     ` Chen Gang
     [not found]     ` <55283AC6.2000205@hotmail.com>
2015-05-10  8:50       ` Chen Gang
2015-03-27 10:55 ` [Qemu-devel] [PATCH 07/12 v9] target-tilegx: Add helper " Chen Gang
2015-03-27 10:56 ` [Qemu-devel] [PATCH 08/12 v9] target-tilegx: Add opcode basic implementation for tilegx Chen Gang
2015-04-09 22:03   ` Peter Maydell
2015-04-10 21:06     ` Chen Gang
2015-03-27 10:57 ` [Qemu-devel] [PATCH 09/12 v9] target-tilegx: Finish processing bundle and preparing decoding pipes Chen Gang
2015-04-09 22:08   ` Peter Maydell
2015-04-10 21:08     ` Chen Gang
2015-03-27 11:00 ` [Qemu-devel] [PATCH 10/12 v9] target-tilegx: Add TILE-Gx building files Chen Gang
2015-04-09 22:10   ` Peter Maydell
2015-04-10 21:11     ` Chen Gang
2015-03-27 11:05 ` [Qemu-devel] [PATCH 11/12 v9] target-tilegx: Decoding pipes to support finish running 1st system call Chen Gang
2015-03-27 11:07 ` [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to " Chen Gang
2015-04-09 22:19   ` Peter Maydell
2015-04-10 21:28     ` Chen Gang
2015-04-10 21:56       ` Peter Maydell
2015-04-11  3:11         ` Chen Gang
2015-04-21 21:01       ` Chen Gang
2015-04-21 21:15         ` Peter Maydell
2015-04-21 21:23           ` Chen Gang
2015-04-21 21:31             ` Peter Maydell
2015-04-22 13:42               ` Chen Gang

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='CAFEAcA-MwBYFo8AyYWoO6Uk_TWqbPJyJXgDwubYyPyRsOJ1T=A@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=cmetcalf@ezchip.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    --cc=walt@tilera.com \
    --cc=xili_gchen_5257@hotmail.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 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.