From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buios-00041I-KR for qemu-devel@nongnu.org; Thu, 13 Oct 2016 12:25:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buioo-0007qA-26 for qemu-devel@nongnu.org; Thu, 13 Oct 2016 12:25:22 -0400 From: Laurent Vivier Date: Thu, 13 Oct 2016 18:24:45 +0200 Message-Id: <1476375902-11715-4-git-send-email-lvivier@redhat.com> In-Reply-To: <1476375902-11715-1-git-send-email-lvivier@redhat.com> References: <1476375902-11715-1-git-send-email-lvivier@redhat.com> Subject: [Qemu-devel] [PATCH v2 03/20] target-ppc: move back cpu_exec_init() to init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: David Gibson , Paolo Bonzini , Peter Maydell , Eduardo Habkost , Bharata B Rao , Markus Armbruster , Matthew Rosato , Laurent Vivier , Alexander Graf , qemu-ppc@nongnu.org We have now the cpu_exec_realize() in realize, so the init part must be in init. As cpu_exec_unrealize() is called from cpu_common_finalize(), remove the call from ppc_cpu_unrealizefn(). CC: Bharata B Rao CC: Alexander Graf CC: qemu-ppc@nongnu.org Signed-off-by: Laurent Vivier --- target-ppc/translate_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 094f28a..bbca8b5 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -9678,7 +9678,6 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp) } #endif - cpu_exec_init(cs); cpu_exec_realize(cs, &local_err); if (local_err != NULL) { error_propagate(errp, local_err); @@ -9911,8 +9910,6 @@ static void ppc_cpu_unrealizefn(DeviceState *dev, Error **errp) opc_handler_t **table, **table_2; int i, j, k; - cpu_exec_unrealize(CPU(dev)); - for (i = 0; i < PPC_CPU_OPCODES_LEN; i++) { if (env->opcodes[i] == &invalid_handler) { continue; @@ -10435,6 +10432,7 @@ static void ppc_cpu_initfn(Object *obj) CPUPPCState *env = &cpu->env; cs->env_ptr = env; + cpu_exec_init(cs); env->msr_mask = pcc->msr_mask; env->mmu_model = pcc->mmu_model; -- 2.7.4