[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/22] cpu: Change tcg_cpu_exec() arg to cpu, not env
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 09/22] cpu: Change tcg_cpu_exec() arg to cpu, not env |
Date: |
Tue, 7 Jul 2015 01:13:52 +0200 |
From: Peter Crosthwaite <address@hidden>
The sole caller of this function navigates the cpu->env_ptr only for
this function to take it back the cpu pointer straight away. Pass in
cpu pointer instead and grab the env pointer locally in the function.
Removes a core code usage of ENV_GET_CPU().
Reviewed-by: Andreas Färber <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
cpus.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index f547aeb..24cac2e 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1357,9 +1357,9 @@ int vm_stop_force_state(RunState state)
}
}
-static int tcg_cpu_exec(CPUArchState *env)
+static int tcg_cpu_exec(CPUState *cpu)
{
- CPUState *cpu = ENV_GET_CPU(env);
+ CPUArchState *env = cpu->env_ptr;
int ret;
#ifdef CONFIG_PROFILER
int64_t ti;
@@ -1421,13 +1421,12 @@ static void tcg_exec_all(void)
}
for (; next_cpu != NULL && !exit_request; next_cpu = CPU_NEXT(next_cpu)) {
CPUState *cpu = next_cpu;
- CPUArchState *env = cpu->env_ptr;
qemu_clock_enable(QEMU_CLOCK_VIRTUAL,
(cpu->singlestep_enabled & SSTEP_NOTIMER) == 0);
if (cpu_can_run(cpu)) {
- r = tcg_cpu_exec(env);
+ r = tcg_cpu_exec(cpu);
if (r == EXCP_DEBUG) {
cpu_handle_guest_debug(cpu);
break;
--
2.1.4
- [Qemu-devel] [PULL 00/22] QOM CPUState patch queue 2015-07-06, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 01/22] cpu: No need to zero-initialize CPUState::numa_node, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 02/22] cpu: Initialize breakpoint/watchpoint lists in cpu_common_initfn(), Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 03/22] cpu: Reorder cpu->as, cpu->thread_id, cpu->memory_dispatch init, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 05/22] cpu: Convert cpu_index into a bitmap, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 06/22] target-ppc: Move cpu_exec_init() call to realize function, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 04/22] cpu: Add Error argument to cpu_exec_init(), Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 09/22] cpu: Change tcg_cpu_exec() arg to cpu, not env,
Andreas Färber <=
- [Qemu-devel] [PULL 12/22] cpu: Add wrapper for the set_pc() hook, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 07/22] translate-all: Change tb_flush() env argument to cpu, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 08/22] gdbstub: Change gdbserver_fork() to accept cpu instead of env, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 15/22] microblaze: boot: Use cpu_set_pc(), Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 13/22] gdbstub: Use cpu_set_pc() helper, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 14/22] hw/arm/boot: Use cpu_set_pc(), Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 10/22] cpu: Change cpu_exec_init() arg to cpu, not env, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 17/22] disas: QOMify target specific setup, Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 11/22] cpu-exec: Purge all uses of ENV_GET_CPU(), Andreas Färber, 2015/07/06
- [Qemu-devel] [PULL 18/22] disas: arm-a64: Make printfer and stream variable, Andreas Färber, 2015/07/06