From patchwork Fri Mar 27 10:50:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 455381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 293BD14007F for ; Fri, 27 Mar 2015 21:51:23 +1100 (AEDT) Received: from localhost ([::1]:49428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbRrF-0005U9-5d for incoming@patchwork.ozlabs.org; Fri, 27 Mar 2015 06:51:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbRqp-0004l3-OW for qemu-devel@nongnu.org; Fri, 27 Mar 2015 06:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbRqm-0005Rt-5W for qemu-devel@nongnu.org; Fri, 27 Mar 2015 06:50:55 -0400 Received: from blu004-omc1s29.hotmail.com ([65.55.116.40]:62159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbRqm-0005Rj-22 for qemu-devel@nongnu.org; Fri, 27 Mar 2015 06:50:52 -0400 Received: from BLU436-SMTP14 ([65.55.116.9]) by BLU004-OMC1S29.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Fri, 27 Mar 2015 03:50:51 -0700 X-TMN: [Me29s4w9XRccFclVr1vn7N0ROhDthNZN] X-Originating-Email: [xili_gchen_5257@hotmail.com] Message-ID: Date: Fri, 27 Mar 2015 18:50:46 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "rth@twiddle.net" , Chris Metcalf , Peter Maydell , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= References: <55153546.5060906@hotmail.com> In-Reply-To: <55153546.5060906@hotmail.com> X-OriginalArrivalTime: 27 Mar 2015 10:50:50.0387 (UTC) FILETIME=[E3AE6E30:01D0687B] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 65.55.116.40 Cc: "walt@tilera.com" , Riku Voipio , qemu-devel Subject: [Qemu-devel] [PATCH 03/12 v9] linux-user: Support tilegx architecture in syscall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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;