From patchwork Wed Oct 31 00:59:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [17/35] cpus: Pass CPUState to qemu_tcg_init_vcpu() From: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 195712 Message-Id: <1351645206-3041-18-git-send-email-afaerber@suse.de> To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws Date: Wed, 31 Oct 2012 01:59:48 +0100 CPUArchState is no longer needed. Signed-off-by: Andreas Färber --- cpus.c | 7 ++----- 1 Datei geändert, 2 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-) diff --git a/cpus.c b/cpus.c index 068fa12..5f91523 100644 --- a/cpus.c +++ b/cpus.c @@ -991,11 +991,8 @@ void resume_all_vcpus(void) } } -static void qemu_tcg_init_vcpu(void *_env) +static void qemu_tcg_init_vcpu(CPUState *cpu) { - CPUArchState *env = _env; - CPUState *cpu = ENV_GET_CPU(env); - /* share a single thread for all cpus with TCG */ if (!tcg_cpu_thread) { cpu->thread = g_malloc0(sizeof(QemuThread)); @@ -1056,7 +1053,7 @@ void qemu_init_vcpu(void *_env) if (kvm_enabled()) { qemu_kvm_start_vcpu(env); } else if (tcg_enabled()) { - qemu_tcg_init_vcpu(env); + qemu_tcg_init_vcpu(cpu); } else { qemu_dummy_start_vcpu(env); }