All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [Qemu-devel] [PATCH 08/33] linux-user: Make syscall number unsigned
Date: Fri,  1 Jun 2018 00:30:25 -0700	[thread overview]
Message-ID: <20180601073050.8054-9-richard.henderson@linaro.org> (raw)
In-Reply-To: <20180601073050.8054-1-richard.henderson@linaro.org>

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/qemu.h    |  2 +-
 linux-user/syscall.c | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 05a82a3628..623a8d8b7a 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -231,7 +231,7 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
 void target_set_brk(abi_ulong new_brk);
 abi_long do_brk(abi_ulong new_brk);
 void syscall_init(void);
-abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+abi_long do_syscall(void *cpu_env, unsigned num, abi_long arg1,
                     abi_long arg2, abi_long arg3, abi_long arg4,
                     abi_long arg5, abi_long arg6, abi_long arg7,
                     abi_long arg8);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index a413aad658..e2e2d58e84 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -719,20 +719,20 @@ static inline int next_free_host_timer(void)
 
 /* ARM EABI and MIPS expect 64bit types aligned even on pairs or registers */
 #ifdef TARGET_ARM
-static inline int regpairs_aligned(void *cpu_env, int num)
+static inline int regpairs_aligned(void *cpu_env, unsigned num)
 {
     return ((((CPUARMState *)cpu_env)->eabi) == 1) ;
 }
 #elif defined(TARGET_MIPS) && (TARGET_ABI_BITS == 32)
-static inline int regpairs_aligned(void *cpu_env, int num) { return 1; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; }
 #elif defined(TARGET_PPC) && !defined(TARGET_PPC64)
 /* SysV AVI for PPC32 expects 64bit parameters to be passed on odd/even pairs
  * of registers which translates to the same as ARM/MIPS, because we start with
  * r3 as arg1 */
-static inline int regpairs_aligned(void *cpu_env, int num) { return 1; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; }
 #elif defined(TARGET_SH4)
 /* SH4 doesn't align register pairs, except for p{read,write}64 */
-static inline int regpairs_aligned(void *cpu_env, int num)
+static inline int regpairs_aligned(void *cpu_env, unsigned num)
 {
     switch (num) {
     case TARGET_NR_pread64:
@@ -744,9 +744,9 @@ static inline int regpairs_aligned(void *cpu_env, int num)
     }
 }
 #elif defined(TARGET_XTENSA)
-static inline int regpairs_aligned(void *cpu_env, int num) { return 1; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; }
 #else
-static inline int regpairs_aligned(void *cpu_env, int num) { return 0; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 0; }
 #endif
 
 #define ERRNO_TABLE_SIZE 1200
@@ -7962,9 +7962,9 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask,
     return 0;
 }
 
-static abi_long do_unimplemented(int num)
+static abi_long do_unimplemented(unsigned num)
 {
-    gemu_log("qemu: Unsupported syscall: %d\n", num);
+    gemu_log("qemu: Unsupported syscall: %u\n", num);
     return -TARGET_ENOSYS;
 }
 
@@ -7973,7 +7973,7 @@ static abi_long do_unimplemented(int num)
  * of syscall results, can be performed.
  * All errnos that do_syscall() returns must be -TARGET_<errcode>.
  */
-static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
+static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1,
                             abi_long arg2, abi_long arg3, abi_long arg4,
                             abi_long arg5, abi_long arg6, abi_long arg7,
                             abi_long arg8)
@@ -12880,7 +12880,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
     return ret;
 }
 
-abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+abi_long do_syscall(void *cpu_env, unsigned num, abi_long arg1,
                     abi_long arg2, abi_long arg3, abi_long arg4,
                     abi_long arg5, abi_long arg6, abi_long arg7,
                     abi_long arg8)
-- 
2.17.0

  parent reply	other threads:[~2018-06-01  7:31 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01  7:30 [Qemu-devel] [PATCH 00/33] linux-user: Begin splitting do_syscall Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 01/33] linux-user: Split out do_syscall1 Richard Henderson
2018-06-01  7:36   ` Laurent Vivier
2018-06-01 14:00   ` Eric Blake
2018-06-01 14:52     ` Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 02/33] linux-user: Relax single exit from "break" Richard Henderson
2018-06-04 19:29   ` Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 03/33] linux-user: Propagate goto ebadf to return Richard Henderson
2018-06-04 19:33   ` Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 04/33] linux-user: Propagate goto efault " Richard Henderson
2018-06-04 19:35   ` Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 05/33] linux-user: Propagate goto unimplemented_nowarn " Richard Henderson
2018-06-04 19:36   ` Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 06/33] linux-user: Split out goto unimplemented to do_unimplemented Richard Henderson
2018-06-04 19:38   ` Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 07/33] linux-user: Propagate goto fail to return Richard Henderson
2018-06-04 19:48   ` Laurent Vivier
2018-06-01  7:30 ` Richard Henderson [this message]
2018-06-04 19:50   ` [Qemu-devel] [PATCH 08/33] linux-user: Make syscall number unsigned Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 09/33] linux-user: Set up infrastructure for table-izing syscalls Richard Henderson
2018-06-04 19:55   ` Laurent Vivier
2018-06-01  7:30 ` [Qemu-devel] [PATCH 10/33] linux-user: Split out brk, close, exit, read, write Richard Henderson
2018-06-04 20:17   ` Laurent Vivier
2018-06-04 21:01     ` Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 11/33] linux-user: Split out execve Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 12/33] linux-user: Split out open, openat Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 13/33] linux-user: Split out name_to_handle_at Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 14/33] linux-user: Split out open_to_handle_at Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 15/33] linux-user: Split out creat, fork, waitid, waitpid Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 16/33] linux-user: Split out link, linkat Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 17/33] linux-user: Split out unlink, unlinkat Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 18/33] linux-user: Split out chdir, mknod, mknodat, time, chmod Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 19/33] linux-user: Remove all unimplemented entries Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 20/33] linux-user: Split out getpid, getxpid, lseek Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 21/33] linux-user: Split out mount, umount Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 22/33] linux-user: Split out alarm, pause, stime, utime, utimes Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 23/33] linux-user: Split out access, faccessat, futimesat, kill, nice, sync, syncfs Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 24/33] linux-user: Split out rename, renameat, renameat2 Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 25/33] linux-user: Split out dup, mkdir, mkdirat, rmdir Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 26/33] linux-user: Split out acct, pipe, pipe2, times, umount2 Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 27/33] linux-user: Split out ioctl Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 28/33] linux-user: Split out chroot, dup2, dup3, fcntl, setpgid, umask Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 29/33] linux-user: Split out getpgrp, getppid, setsid Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 30/33] linux-user: Split out rt_sigaction, sigaction Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 31/33] linux-user: Split out rt_sigprocmask, sgetmask, sigprocmask, ssetmask Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 32/33] linux-user: Split out rt_sigpending, rt_sigsuspend, sigpending, sigsuspend Richard Henderson
2018-06-01  7:30 ` [Qemu-devel] [PATCH 33/33] linux-user: Split out rt_sigqueueinfo, rt_sigtimedwait, rt_tgsigqueueinfo Richard Henderson
2018-06-01  7:33 ` [Qemu-devel] [PATCH 00/33] linux-user: Begin splitting do_syscall Richard Henderson
2018-06-01  8:05 ` no-reply

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=20180601073050.8054-9-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /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.