All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Chris Metcalf <cmetcalf@ezchip.com>,
	"rth@twiddle.net" <rth@twiddle.net>,
	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 v4] linux-user: Support tilegx architecture in syscall
Date: Sun, 22 Feb 2015 21:36:00 +0800	[thread overview]
Message-ID: <54E9DB40.6000301@sunrus.com.cn> (raw)
In-Reply-To: <54E9DA4D.1050702@sunrus.com.cn>

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 9ed6de8..a0d9d77 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
@@ -1970,6 +1972,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
@@ -2312,7 +2340,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-02-22 13:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-22 13:31 [Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user Chen Gang S
2015-02-22 13:33 ` [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features Chen Gang S
2015-02-27 17:36   ` Andreas Färber
2015-02-27 21:49     ` Chris Metcalf
2015-02-28  2:10       ` Chen Gang S
2015-02-28  2:09         ` Chris Metcalf
2015-02-28  4:39           ` Chen Gang S
2015-02-28  5:20     ` Chen Gang S
2015-02-28 20:04       ` Chen Gang S
2015-02-28 19:19     ` Chen Gang S
2015-02-22 13:35 ` [Qemu-devel] [PATCH 3/6 v4] linux-user: tilegx: Add target features support within qemu Chen Gang S
2015-02-22 13:36 ` Chen Gang S [this message]
2015-02-27 17:40   ` [Qemu-devel] [PATCH 4/6 v4] linux-user: Support tilegx architecture in syscall Andreas Färber
2015-02-27 23:10     ` Chen Gang S
2015-02-22 13:36 ` [Qemu-devel] [PATCH 5/6 v4] linux-user: Support tilegx architecture in linux-user Chen Gang S
2015-02-22 13:37 ` [Qemu-devel] [PATCH 6/6 v4] linux-user/syscall.c: Switch all macros which are not defined in tilegx Chen Gang S
2015-02-27 18:24   ` Andreas Färber
2015-02-27 23:06     ` Chen Gang S
2015-02-22 18:29 ` [Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user Richard Henderson
2015-02-23  1:40   ` Chen Gang S
2015-02-22 22:32 ` Bastian Koppelmann
2015-02-23  1:37   ` Chen Gang S
2015-02-26 23:56   ` Chen Gang S
2015-02-27  0:32     ` Chen Gang S

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=54E9DB40.6000301@sunrus.com.cn \
    --to=gang.chen@sunrus.com.cn \
    --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.