From nobody Wed Nov 5 06:42:58 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 1532456324439315.1499759171621; Tue, 24 Jul 2018 11:18:44 -0700 (PDT) Received: from localhost ([::1]:41954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi1tP-00011O-4O for importer@patchew.org; Tue, 24 Jul 2018 14:18:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi1gQ-0007jA-BN for qemu-devel@nongnu.org; Tue, 24 Jul 2018 14:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi1gL-0006Ek-7D for qemu-devel@nongnu.org; Tue, 24 Jul 2018 14:05:14 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:57626 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 1fi1gK-0006D2-RS for qemu-devel@nongnu.org; Tue, 24 Jul 2018 14:05:09 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id A4A351A44EA; Tue, 24 Jul 2018 20:05:07 +0200 (CEST) Received: from rtrkw774-lin.mipstec.com (unknown [82.117.201.26]) by mail.rt-rk.com (Postfix) with ESMTPSA id 855951A1DCE; Tue, 24 Jul 2018 20:05:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 19:31:57 +0200 Message-Id: <1532453527-22911-46-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532453527-22911-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1532453527-22911-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v4 45/55] 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: 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 Rikalo Update constants and structures related to 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