Replace 'void *cpu_env' parameters with 'CPUArchState *env' across all bsd-user source files. This improves type safety and aligns with the convention used in the rest of the codebase.
Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Warner Losh <[email protected]> Assisted-by: Claude Opus 4.6 (1M context) --- bsd-user/aarch64/target.h | 2 +- bsd-user/arm/target.h | 2 +- bsd-user/bsd-file.h | 28 +++++++++++++-------------- bsd-user/bsd-mem.h | 4 ++-- bsd-user/bsd-proc.h | 6 +++--- bsd-user/freebsd/os-proc.c | 4 ++-- bsd-user/freebsd/os-proc.h | 26 ++++++++++++------------- bsd-user/freebsd/os-sys.c | 4 ++-- bsd-user/freebsd/os-syscall.c | 44 +++++++++++++++++++++---------------------- bsd-user/i386/target.h | 2 +- bsd-user/qemu.h | 6 +++--- bsd-user/riscv/target.h | 2 +- bsd-user/x86_64/target.h | 2 +- 13 files changed, 66 insertions(+), 66 deletions(-) diff --git a/bsd-user/aarch64/target.h b/bsd-user/aarch64/target.h index 702aeb7fc5..37b9817fe1 100644 --- a/bsd-user/aarch64/target.h +++ b/bsd-user/aarch64/target.h @@ -12,7 +12,7 @@ /* * aaarch64 ABI does not 'lump' the registers for 64-bit args. */ -static inline bool regpairs_aligned(void *cpu_env) +static inline bool regpairs_aligned(CPUArchState *env) { return false; } diff --git a/bsd-user/arm/target.h b/bsd-user/arm/target.h index 7c423ec575..cf131f29fb 100644 --- a/bsd-user/arm/target.h +++ b/bsd-user/arm/target.h @@ -12,7 +12,7 @@ /* * arm EABI 'lumps' the registers for 64-bit args. */ -static inline bool regpairs_aligned(void *cpu_env) +static inline bool regpairs_aligned(CPUArchState *env) { return true; } diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h index dca1518cb1..dec59bd80b 100644 --- a/bsd-user/bsd-file.h +++ b/bsd-user/bsd-file.h @@ -72,7 +72,7 @@ static abi_long do_bsd_read(abi_long arg1, abi_long arg2, abi_long arg3) } /* pread(2) */ -static abi_long do_bsd_pread(void *cpu_env, abi_long arg1, +static abi_long do_bsd_pread(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { abi_long ret; @@ -82,7 +82,7 @@ static abi_long do_bsd_pread(void *cpu_env, abi_long arg1, if (p == NULL) { return -TARGET_EFAULT; } - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg4 = arg5; arg5 = arg6; } @@ -109,14 +109,14 @@ static abi_long do_bsd_readv(abi_long arg1, abi_long arg2, abi_long arg3) } /* preadv(2) */ -static abi_long do_bsd_preadv(void *cpu_env, abi_long arg1, +static abi_long do_bsd_preadv(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { abi_long ret; struct iovec *vec = lock_iovec(VERIFY_WRITE, arg2, arg3, 1); if (vec != NULL) { - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg4 = arg5; arg5 = arg6; } @@ -151,7 +151,7 @@ static abi_long do_bsd_write(abi_long arg1, abi_long arg2, abi_long arg3) } /* pwrite(2) */ -static abi_long do_bsd_pwrite(void *cpu_env, abi_long arg1, +static abi_long do_bsd_pwrite(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { abi_long ret; @@ -161,7 +161,7 @@ static abi_long do_bsd_pwrite(void *cpu_env, abi_long arg1, if (p == NULL) { return -TARGET_EFAULT; } - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg4 = arg5; arg5 = arg6; } @@ -188,14 +188,14 @@ static abi_long do_bsd_writev(abi_long arg1, abi_long arg2, abi_long arg3) } /* pwritev(2) */ -static abi_long do_bsd_pwritev(void *cpu_env, abi_long arg1, +static abi_long do_bsd_pwritev(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { abi_long ret; struct iovec *vec = lock_iovec(VERIFY_READ, arg2, arg3, 1); if (vec != NULL) { - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg4 = arg5; arg5 = arg6; } @@ -484,14 +484,14 @@ static abi_long do_bsd_dup2(abi_long arg1, abi_long arg2) } /* truncate(2) */ -static abi_long do_bsd_truncate(void *cpu_env, abi_long arg1, +static abi_long do_bsd_truncate(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4) { abi_long ret; void *p; LOCK_PATH(p, arg1); - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg2 = arg3; arg3 = arg4; } @@ -502,10 +502,10 @@ static abi_long do_bsd_truncate(void *cpu_env, abi_long arg1, } /* ftruncate(2) */ -static abi_long do_bsd_ftruncate(void *cpu_env, abi_long arg1, +static abi_long do_bsd_ftruncate(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4) { - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg2 = arg3; arg3 = arg4; } @@ -735,7 +735,7 @@ static abi_long do_bsd_freebsd11_mknodat(abi_long arg1, abi_long arg2, } /* post-ino64 mknodat(2) */ -static abi_long do_bsd_mknodat(void *cpu_env, abi_long arg1, +static abi_long do_bsd_mknodat(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { @@ -744,7 +744,7 @@ static abi_long do_bsd_mknodat(void *cpu_env, abi_long arg1, LOCK_PATH(p, arg2); /* 32-bit arch's use two 32 registers for 64 bit return value */ - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { ret = get_errno(mknodat(arg1, p, arg3, target_arg64(arg5, arg6))); } else { ret = get_errno(mknodat(arg1, p, arg3, target_arg64(arg4, arg5))); diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index 9d7b60d3c3..3086143d40 100644 --- a/bsd-user/bsd-mem.h +++ b/bsd-user/bsd-mem.h @@ -51,11 +51,11 @@ extern abi_ulong target_brk; extern abi_ulong initial_target_brk; /* mmap(2) */ -static inline abi_long do_bsd_mmap(void *cpu_env, abi_long arg1, abi_long arg2, +static inline abi_long do_bsd_mmap(CPUArchState *env, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) { - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { arg6 = arg7; arg7 = arg8; } diff --git a/bsd-user/bsd-proc.h b/bsd-user/bsd-proc.h index b1d4446ff1..62052c70b9 100644 --- a/bsd-user/bsd-proc.h +++ b/bsd-user/bsd-proc.h @@ -6,8 +6,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef BSD_PROC_H_ -#define BSD_PROC_H_ +#ifndef BSD_PROC_H +#define BSD_PROC_H #include <sys/resource.h> @@ -19,7 +19,7 @@ extern int _getlogin(char*, int); int bsd_get_ncpu(void); /* exit(2) */ -static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1) +static inline abi_long do_bsd_exit(CPUArchState *env, abi_long arg1) { gdb_exit(arg1); qemu_plugin_user_exit(); diff --git a/bsd-user/freebsd/os-proc.c b/bsd-user/freebsd/os-proc.c index 0309036178..0a0cea5bb2 100644 --- a/bsd-user/freebsd/os-proc.c +++ b/bsd-user/freebsd/os-proc.c @@ -238,7 +238,7 @@ h2t_procctl_reaper_pidinfo(struct procctl_reaper_pidinfo *host_pi, } abi_long -do_freebsd_procctl(void *cpu_env, int idtype, abi_ulong arg2, abi_ulong arg3, +do_freebsd_procctl(CPUArchState *env, int idtype, abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, abi_ulong arg5, abi_ulong arg6) { abi_long error = 0, target_rp_pids; @@ -257,7 +257,7 @@ do_freebsd_procctl(void *cpu_env, int idtype, abi_ulong arg2, abi_ulong arg3, #if TARGET_ABI_BITS == 32 /* See if we need to align the register pairs. */ - if (regpairs_aligned(cpu_env)) { + if (regpairs_aligned(env)) { id = (id_t)target_arg64(arg3, arg4); target_cmd = (int)arg5; target_arg = arg6; diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h index 72ccf23e17..fef6c03319 100644 --- a/bsd-user/freebsd/os-proc.h +++ b/bsd-user/freebsd/os-proc.h @@ -67,7 +67,7 @@ static inline abi_long do_freebsd_wait4(abi_long arg1, abi_ulong target_status, } /* wait6(2) */ -static inline abi_long do_freebsd_wait6(void *cpu_env, abi_long idtype, +static inline abi_long do_freebsd_wait6(CPUArchState *env, abi_long idtype, abi_long id1, abi_long id2, abi_ulong target_status, abi_long options, abi_ulong target_wrusage, abi_ulong target_infop, abi_ulong pad1) @@ -78,7 +78,7 @@ static inline abi_long do_freebsd_wait6(void *cpu_env, abi_long idtype, siginfo_t info; void *p; - if (regpairs_aligned(cpu_env) != 0) { + if (regpairs_aligned(env) != 0) { /* printf("shifting args\n"); */ /* 64-bit id is aligned, so shift all the arguments over by one */ id1 = id2; @@ -172,7 +172,7 @@ static inline abi_long do_freebsd___setugid(abi_long arg1) } /* fork(2) */ -static inline abi_long do_freebsd_fork(void *cpu_env) +static inline abi_long do_freebsd_fork(CPUArchState *env) { abi_long ret; abi_ulong child_flag; @@ -182,7 +182,7 @@ static inline abi_long do_freebsd_fork(void *cpu_env) if (ret == 0) { /* child */ child_flag = 1; - target_cpu_clone_regs(cpu_env, 0); + target_cpu_clone_regs(env, 0); } else { /* parent */ child_flag = 0; @@ -192,7 +192,7 @@ static inline abi_long do_freebsd_fork(void *cpu_env) * The fork system call sets a child flag in the second return * value: 0 for parent process, 1 for child process. */ - set_second_rval(cpu_env, child_flag); + set_second_rval(env, child_flag); fork_end(ret); @@ -200,13 +200,13 @@ static inline abi_long do_freebsd_fork(void *cpu_env) } /* vfork(2) */ -static inline abi_long do_freebsd_vfork(void *cpu_env) +static inline abi_long do_freebsd_vfork(CPUArchState *env) { - return do_freebsd_fork(cpu_env); + return do_freebsd_fork(env); } /* rfork(2) */ -static inline abi_long do_freebsd_rfork(void *cpu_env, abi_long flags) +static inline abi_long do_freebsd_rfork(CPUArchState *env, abi_long flags) { abi_long ret; abi_ulong child_flag; @@ -227,7 +227,7 @@ static inline abi_long do_freebsd_rfork(void *cpu_env, abi_long flags) if (ret == 0) { /* child */ child_flag = 1; - target_cpu_clone_regs(cpu_env, 0); + target_cpu_clone_regs(env, 0); } else { /* parent */ child_flag = 0; @@ -237,7 +237,7 @@ static inline abi_long do_freebsd_rfork(void *cpu_env, abi_long flags) * The fork system call sets a child flag in the second return * value: 0 for parent process, 1 for child process. */ - set_second_rval(cpu_env, child_flag); + set_second_rval(env, child_flag); fork_end(ret); return ret; @@ -245,7 +245,7 @@ static inline abi_long do_freebsd_rfork(void *cpu_env, abi_long flags) } /* pdfork(2) */ -static inline abi_long do_freebsd_pdfork(void *cpu_env, abi_ulong target_fdp, +static inline abi_long do_freebsd_pdfork(CPUArchState *env, abi_ulong target_fdp, abi_long flags) { abi_long ret; @@ -257,7 +257,7 @@ static inline abi_long do_freebsd_pdfork(void *cpu_env, abi_ulong target_fdp, if (ret == 0) { /* child */ child_flag = 1; - target_cpu_clone_regs(cpu_env, 0); + target_cpu_clone_regs(env, 0); } else { /* parent */ child_flag = 0; @@ -270,7 +270,7 @@ static inline abi_long do_freebsd_pdfork(void *cpu_env, abi_ulong target_fdp, * The fork system call sets a child flag in the second return * value: 0 for parent process, 1 for child process. */ - set_second_rval(cpu_env, child_flag); + set_second_rval(env, child_flag); fork_end(ret); return ret; diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c index df31706558..d6f7c92420 100644 --- a/bsd-user/freebsd/os-sys.c +++ b/bsd-user/freebsd/os-sys.c @@ -593,7 +593,7 @@ out: } /* sysarch() is architecture dependent. */ -abi_long do_freebsd_sysarch(void *cpu_env, abi_long arg1, abi_long arg2) +abi_long do_freebsd_sysarch(CPUArchState *env, abi_long arg1, abi_long arg2) { - return do_freebsd_arch_sysarch(cpu_env, arg1, arg2); + return do_freebsd_arch_sysarch(env, arg1, arg2); } diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index 90ef1bd916..d402c64726 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -215,7 +215,7 @@ void unlock_iovec(struct iovec *vec, abi_ulong target_addr, /* * All errnos that freebsd_syscall() returns must be -TARGET_<errcode>. */ -static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, +static abi_long freebsd_syscall(CPUArchState *env, int 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) @@ -227,19 +227,19 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, * process system calls */ case TARGET_FREEBSD_NR_fork: /* fork(2) */ - ret = do_freebsd_fork(cpu_env); + ret = do_freebsd_fork(env); break; case TARGET_FREEBSD_NR_vfork: /* vfork(2) */ - ret = do_freebsd_vfork(cpu_env); + ret = do_freebsd_vfork(env); break; case TARGET_FREEBSD_NR_rfork: /* rfork(2) */ - ret = do_freebsd_rfork(cpu_env, arg1); + ret = do_freebsd_rfork(env, arg1); break; case TARGET_FREEBSD_NR_pdfork: /* pdfork(2) */ - ret = do_freebsd_pdfork(cpu_env, arg1, arg2); + ret = do_freebsd_pdfork(env, arg1, arg2); break; case TARGET_FREEBSD_NR_execve: /* execve(2) */ @@ -255,12 +255,12 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_wait6: /* wait6(2) */ - ret = do_freebsd_wait6(cpu_env, arg1, arg2, arg3, + ret = do_freebsd_wait6(env, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); break; case TARGET_FREEBSD_NR_exit: /* exit(2) */ - ret = do_bsd_exit(cpu_env, arg1); + ret = do_bsd_exit(env, arg1); break; case TARGET_FREEBSD_NR_getgroups: /* getgroups(2) */ @@ -424,7 +424,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_procctl: /* procctl(2) */ - ret = do_freebsd_procctl(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_freebsd_procctl(env, arg1, arg2, arg3, arg4, arg5, arg6); break; /* @@ -435,7 +435,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_pread: /* pread(2) */ - ret = do_bsd_pread(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_bsd_pread(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR_readv: /* readv(2) */ @@ -443,7 +443,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_preadv: /* preadv(2) */ - ret = do_bsd_preadv(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_bsd_preadv(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR_write: /* write(2) */ @@ -451,7 +451,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_pwrite: /* pwrite(2) */ - ret = do_bsd_pwrite(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_bsd_pwrite(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR_writev: /* writev(2) */ @@ -459,7 +459,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_pwritev: /* pwritev(2) */ - ret = do_bsd_pwritev(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_bsd_pwritev(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR_open: /* open(2) */ @@ -559,11 +559,11 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_truncate: /* truncate(2) */ - ret = do_bsd_truncate(cpu_env, arg1, arg2, arg3, arg4); + ret = do_bsd_truncate(env, arg1, arg2, arg3, arg4); break; case TARGET_FREEBSD_NR_ftruncate: /* ftruncate(2) */ - ret = do_bsd_ftruncate(cpu_env, arg1, arg2, arg3, arg4); + ret = do_bsd_ftruncate(env, arg1, arg2, arg3, arg4); break; case TARGET_FREEBSD_NR_acct: /* acct(2) */ @@ -595,7 +595,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_readlink: /* readlink(2) */ - ret = do_bsd_readlink(cpu_env, arg1, arg2, arg3); + ret = do_bsd_readlink(env, arg1, arg2, arg3); break; case TARGET_FREEBSD_NR_readlinkat: /* readlinkat(2) */ @@ -627,7 +627,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, break; case TARGET_FREEBSD_NR_mknodat: /* mknodat(2) */ - ret = do_bsd_mknodat(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_bsd_mknodat(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR_chown: /* chown(2) */ @@ -807,7 +807,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, * Memory management system calls. */ case TARGET_FREEBSD_NR_mmap: /* mmap(2) */ - ret = do_bsd_mmap(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + ret = do_bsd_mmap(env, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); break; @@ -953,15 +953,15 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, * sys{ctl, arch, call} */ case TARGET_FREEBSD_NR___sysctl: /* sysctl(3) */ - ret = do_freebsd_sysctl(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_freebsd_sysctl(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR___sysctlbyname: /* sysctlbyname(2) */ - ret = do_freebsd_sysctlbyname(cpu_env, arg1, arg2, arg3, arg4, arg5, arg6); + ret = do_freebsd_sysctlbyname(env, arg1, arg2, arg3, arg4, arg5, arg6); break; case TARGET_FREEBSD_NR_sysarch: /* sysarch(2) */ - ret = do_freebsd_sysarch(cpu_env, arg1, arg2); + ret = do_freebsd_sysarch(env, arg1, arg2); break; default: @@ -979,7 +979,7 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1, * as a wrapper around freebsd_syscall() so that actually happens. Since * that is a singleton, modern compilers will inline it anyway... */ -abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, +abi_long do_freebsd_syscall(CPUArchState *env, int 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) @@ -990,7 +990,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, print_freebsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); } - ret = freebsd_syscall(cpu_env, num, arg1, arg2, arg3, arg4, arg5, arg6, + ret = freebsd_syscall(env, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (do_strace) { print_freebsd_syscall_ret(num, ret); diff --git a/bsd-user/i386/target.h b/bsd-user/i386/target.h index ddd3b8ec08..9cd158fc11 100644 --- a/bsd-user/i386/target.h +++ b/bsd-user/i386/target.h @@ -12,7 +12,7 @@ /* * i386 doesn't 'lump' the registers for 64-bit args. */ -static inline bool regpairs_aligned(void *cpu_env) +static inline bool regpairs_aligned(CPUArchState *env) { return false; } diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index b0b2c249fb..60d1adf560 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -176,7 +176,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_freebsd_syscall(void *cpu_env, int num, abi_long arg1, +abi_long do_freebsd_syscall(CPUArchState *env, int 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); @@ -238,7 +238,7 @@ int host_to_target_errno(int err); /* os-proc.c */ abi_long freebsd_exec_common(abi_ulong path_or_fd, abi_ulong guest_argp, abi_ulong guest_envp, int do_fexec); -abi_long do_freebsd_procctl(void *cpu_env, int idtype, abi_ulong arg2, +abi_long do_freebsd_procctl(CPUArchState *env, int idtype, abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, abi_ulong arg5, abi_ulong arg6); /* os-sys.c */ @@ -247,7 +247,7 @@ abi_long do_freebsd_sysctl(CPUArchState *env, abi_ulong namep, int32_t namelen, abi_long do_freebsd_sysctlbyname(CPUArchState *env, abi_ulong namep, int32_t namelen, abi_ulong oldp, abi_ulong oldlenp, abi_ulong newp, abi_ulong newlen); -abi_long do_freebsd_sysarch(void *cpu_env, abi_long arg1, abi_long arg2); +abi_long do_freebsd_sysarch(CPUArchState *env, abi_long arg1, abi_long arg2); /* user access */ diff --git a/bsd-user/riscv/target.h b/bsd-user/riscv/target.h index 036ddd185e..dc3e0be795 100644 --- a/bsd-user/riscv/target.h +++ b/bsd-user/riscv/target.h @@ -12,7 +12,7 @@ /* * riscv64 ABI does not 'lump' the registers for 64-bit args. */ -static inline bool regpairs_aligned(void *cpu_env) +static inline bool regpairs_aligned(CPUArchState *env) { return false; } diff --git a/bsd-user/x86_64/target.h b/bsd-user/x86_64/target.h index 0cf0e2a14a..fccfc593bd 100644 --- a/bsd-user/x86_64/target.h +++ b/bsd-user/x86_64/target.h @@ -12,7 +12,7 @@ /* * x86 doesn't 'lump' the registers for 64-bit args, all args are 64 bits. */ -static inline bool regpairs_aligned(void *cpu_env) +static inline bool regpairs_aligned(CPUArchState *env) { return false; } -- 2.52.0
