From nobody Wed Nov 5 10:09:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153418657547122.877779006756896; Mon, 13 Aug 2018 11:56:15 -0700 (PDT) Received: from localhost ([::1]:40977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpI0h-0002SJ-0a for importer@patchew.org; Mon, 13 Aug 2018 14:56:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpH3H-0005re-Is for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:54:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpH38-0007Ci-8k for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:54:47 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:55833 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpH37-00079h-HH for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:54:38 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 620151A22DB; Mon, 13 Aug 2018 19:54:13 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 414301A22B1; Mon, 13 Aug 2018 19:54:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Mon, 13 Aug 2018 19:53:35 +0200 Message-Id: <1534182832-554-71-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534182832-554-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1534182832-554-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v8 70/87] linux-user: Update syscall_defs.h header for nanoMIPS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, pburton@wavecomp.com, smarkovic@wavecomp.com, riku.voipio@iki.fi, richard.henderson@linaro.org, laurent@vivier.eu, philippe.mathieu.daude@gmail.com, amarkovic@wavecomp.com, pjovanovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Update constants and structures related to linux user syscall support in nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/syscall_defs.h | 57 ++++++++++++++++++++++++++++++++++++++++++-= ---- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 40bb60e..abf94b8 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -374,7 +374,7 @@ struct target_dirent64 { #define TARGET_SIG_IGN ((abi_long)1) /* ignore signal */ #define TARGET_SIG_ERR ((abi_long)-1) /* error return from signal */ =20 -#ifdef TARGET_MIPS +#if defined(TARGET_MIPS) && !defined(TARGET_NANOMIPS) #define TARGET_NSIG 128 #else #define TARGET_NSIG 64 @@ -445,7 +445,7 @@ struct target_sigaction { target_sigset_t sa_mask; abi_ulong sa_restorer; }; -#elif defined(TARGET_MIPS) +#elif defined(TARGET_MIPS) && !defined(TARGET_NANOMIPS) struct target_sigaction { uint32_t sa_flags; #if defined(TARGET_ABI_MIPSN32) @@ -459,6 +459,14 @@ struct target_sigaction { abi_ulong sa_restorer; #endif }; +#elif defined(TARGET_NANOMIPS) +struct target_sigaction { + abi_ulong _sa_handler; + abi_uint sa_flags; + target_sigset_t sa_mask; + abi_ulong sa_restorer; +}; + #else struct target_old_sigaction { abi_ulong _sa_handler; @@ -537,7 +545,7 @@ typedef struct { #define QEMU_SI_RT 5 =20 typedef struct target_siginfo { -#ifdef TARGET_MIPS +#if defined(TARGET_MIPS) && !defined(TARGET_NANOMIPS) int si_signo; int si_code; int si_errno; @@ -665,13 +673,16 @@ struct target_rlimit { =20 #if defined(TARGET_ALPHA) #define TARGET_RLIM_INFINITY 0x7fffffffffffffffull -#elif defined(TARGET_MIPS) || (defined(TARGET_SPARC) && TARGET_ABI_BITS = =3D=3D 32) +#elif (defined(TARGET_MIPS) && !defined(TARGET_NANOMIPS)) \ + || (defined(TARGET_SPARC) && TARGET_ABI_BITS =3D=3D 32) #define TARGET_RLIM_INFINITY 0x7fffffffUL +#elif defined(TARGET_NANOMIPS) +#define TARGET_RLIM_INFINITY 0x76ffeec4UL #else #define TARGET_RLIM_INFINITY ((abi_ulong)-1) #endif =20 -#if defined(TARGET_MIPS) +#if defined(TARGET_MIPS) && !defined(TARGET_NANOMIPS) #define TARGET_RLIMIT_CPU 0 #define TARGET_RLIMIT_FSIZE 1 #define TARGET_RLIMIT_DATA 2 @@ -687,6 +698,22 @@ struct target_rlimit { #define TARGET_RLIMIT_MSGQUEUE 12 #define TARGET_RLIMIT_NICE 13 #define TARGET_RLIMIT_RTPRIO 14 +#elif defined(TARGET_NANOMIPS) +#define TARGET_RLIMIT_CPU 0 +#define TARGET_RLIMIT_FSIZE 1 +#define TARGET_RLIMIT_DATA 2 +#define TARGET_RLIMIT_STACK 3 +#define TARGET_RLIMIT_CORE 4 +#define TARGET_RLIMIT_RSS 5 +#define TARGET_RLIMIT_NPROC 6 +#define TARGET_RLIMIT_NOFILE 7 +#define TARGET_RLIMIT_MEMLOCK 8 +#define TARGET_RLIMIT_AS 9 +#define TARGET_RLIMIT_LOCKS 10 +#define TARGET_RLIMIT_SIGPENDING 11 +#define TARGET_RLIMIT_MSGQUEUE 12 +#define TARGET_RLIMIT_NICE 13 +#define TARGET_RLIMIT_RTPRIO 14 #else #define TARGET_RLIMIT_CPU 0 #define TARGET_RLIMIT_FSIZE 1 @@ -1657,6 +1684,10 @@ struct target_stat64 { int64_t st_blocks; }; =20 +#elif defined(TARGET_ABI_MIPSP32) + +/* No struct stat and struct stat64 structures */ + #elif defined(TARGET_ALPHA) =20 struct target_stat { @@ -2009,6 +2040,22 @@ struct target_statfs { int32_t f_flags; int32_t f_spare[5]; }; +#elif defined(TARGET_ABI_MIPSP32) +struct target_statfs { + abi_long f_type; + abi_long f_bsize; + abi_long f_blocks; + abi_long f_bfree; + abi_long f_bavail; + abi_long f_files; + abi_long f_ffree; + + /* Linux specials */ + target_fsid_t f_fsid; + abi_long f_namelen; + abi_llong f_frsize; /* Fragment size - unsupported */ + abi_long f_spare[6]; +}; #else struct target_statfs { abi_long f_type; --=20 2.7.4