diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-03-22 16:07:18 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-06-10 07:03:34 -0700 |
commit | 29a0af618ddd21f55df5753c3e16b0625f534b3c (patch) | |
tree | 18b00b62ec94b2c90d4f0594b1bbc8c992a3b777 /linux-user/syscall.c | |
parent | 2161a612b4e1d388046320bc464adefd6bba01a0 (diff) | |
download | qemu-29a0af618ddd21f55df5753c3e16b0625f534b3c.zip |
cpu: Replace ENV_GET_CPU with env_cpu
Now that we have both ArchCPU and CPUArchState, we can define
this generically instead of via macro in each target's cpu.h.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5e29e675e9..d1a2c7831f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5484,7 +5484,7 @@ static void *clone_func(void *arg) rcu_register_thread(); tcg_register_thread(); env = info->env; - cpu = ENV_GET_CPU(env); + cpu = env_cpu(env); thread_cpu = cpu; ts = (TaskState *)cpu->opaque; info->tid = sys_gettid(); @@ -5514,7 +5514,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, abi_ulong parent_tidptr, target_ulong newtls, abi_ulong child_tidptr) { - CPUState *cpu = ENV_GET_CPU(env); + CPUState *cpu = env_cpu(env); int ret; TaskState *ts; CPUState *new_cpu; @@ -5547,7 +5547,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, new_env = cpu_copy(env); /* Init regs that differ from the parent. */ cpu_clone_regs(new_env, newsp); - new_cpu = ENV_GET_CPU(new_env); + new_cpu = env_cpu(new_env); new_cpu->opaque = ts; ts->bprm = parent_ts->bprm; ts->info = parent_ts->info; @@ -6654,7 +6654,7 @@ int host_to_target_waitstatus(int status) static int open_self_cmdline(void *cpu_env, int fd) { - CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env); + CPUState *cpu = env_cpu((CPUArchState *)cpu_env); struct linux_binprm *bprm = ((TaskState *)cpu->opaque)->bprm; int i; @@ -6671,7 +6671,7 @@ static int open_self_cmdline(void *cpu_env, int fd) static int open_self_maps(void *cpu_env, int fd) { - CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env); + CPUState *cpu = env_cpu((CPUArchState *)cpu_env); TaskState *ts = cpu->opaque; FILE *fp; char *line = NULL; @@ -6720,7 +6720,7 @@ static int open_self_maps(void *cpu_env, int fd) static int open_self_stat(void *cpu_env, int fd) { - CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env); + CPUState *cpu = env_cpu((CPUArchState *)cpu_env); TaskState *ts = cpu->opaque; abi_ulong start_stack = ts->info->start_stack; int i; @@ -6757,7 +6757,7 @@ static int open_self_stat(void *cpu_env, int fd) static int open_self_auxv(void *cpu_env, int fd) { - CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env); + CPUState *cpu = env_cpu((CPUArchState *)cpu_env); TaskState *ts = cpu->opaque; abi_ulong auxv = ts->info->saved_auxv; abi_ulong len = ts->info->auxv_len; @@ -7042,7 +7042,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) { - CPUState *cpu = ENV_GET_CPU(cpu_env); + CPUState *cpu = env_cpu(cpu_env); abi_long ret; #if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) \ || defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64) \ @@ -11706,7 +11706,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) { - CPUState *cpu = ENV_GET_CPU(cpu_env); + CPUState *cpu = env_cpu(cpu_env); abi_long ret; #ifdef DEBUG_ERESTARTSYS |