All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <xili_gchen_5257@hotmail.com>
To: "rth@twiddle.net" <rth@twiddle.net>,
	"Andreas Färber" <afaerber@suse.de>,
	"Chris Metcalf" <cmetcalf@ezchip.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Riku Voipio" <riku.voipio@iki.fi>,
	"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 4/6 v7] linux-user: Support tilegx architecture in syscall
Date: Fri, 20 Mar 2015 23:27:56 +0800	[thread overview]
Message-ID: <BLU436-SMTP23580C2FFC82D1D7ABE322B90E0@phx.gbl> (raw)
In-Reply-To: <550C3B78.3050802@hotmail.com>

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;
+};
+
 #else
 #error unsupported CPU
 #endif
@@ -2264,7 +2292,9 @@ struct target_flock {
 struct target_flock64 {
 	short  l_type;
 	short  l_whence;
-#if defined(TARGET_PPC) || defined(TARGET_X86_64) || defined(TARGET_MIPS) || defined(TARGET_SPARC) || defined(TARGET_HPPA) || defined (TARGET_MICROBLAZE)
+#if defined(TARGET_PPC) || defined(TARGET_X86_64) || defined(TARGET_MIPS) \
+    || defined(TARGET_SPARC) || defined(TARGET_HPPA) \
+    || defined(TARGET_MICROBLAZE) || defined(TARGET_TILEGX)
         int __pad;
 #endif
 	unsigned long long l_start;
-- 
1.9.3

  parent reply	other threads:[~2015-03-20 15:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <550C3B78.3050802@hotmail.com>
2015-03-20 15:25 ` [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features Chen Gang
2015-03-20 17:45   ` Richard Henderson
2015-03-20 23:32     ` Chen Gang
2015-03-20 17:48   ` Peter Maydell
2015-03-20 22:52     ` Chen Gang
2015-03-20 23:30       ` Peter Maydell
2015-03-20 23:57         ` Chen Gang
2015-03-21 17:33           ` Peter Maydell
2015-03-21 22:57             ` Chen Gang
2015-03-20 15:26 ` [Qemu-devel] [PATCH 2/6 v7] linux-user: tilegx: Firstly add architecture related features Chen Gang
2015-03-20 15:26 ` [Qemu-devel] [PATCH 3/6 v7] linux-user: tilegx: Add target features support within qemu Chen Gang
2015-03-20 15:27 ` Chen Gang [this message]
2015-03-20 15:28 ` [Qemu-devel] [PATCH 5/6 v7] linux-user: Support tilegx architecture in linux-user Chen Gang
2015-03-20 15:29 ` [Qemu-devel] [PATCH 6/6 v7] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx 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=BLU436-SMTP23580C2FFC82D1D7ABE322B90E0@phx.gbl \
    --to=xili_gchen_5257@hotmail.com \
    --cc=afaerber@suse.de \
    --cc=cmetcalf@ezchip.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    --cc=walt@tilera.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.