From patchwork Tue Dec 18 20:04:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 207194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C63B12C0079 for ; Wed, 19 Dec 2012 07:07:10 +1100 (EST) Received: from localhost ([::1]:34110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3Oi-0008Av-JO for incoming@patchwork.ozlabs.org; Tue, 18 Dec 2012 15:04:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3NN-0005Mz-FI for qemu-devel@nongnu.org; Tue, 18 Dec 2012 15:02:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tl3NH-0000df-Hi for qemu-devel@nongnu.org; Tue, 18 Dec 2012 15:02:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3NH-0000cW-9r for qemu-devel@nongnu.org; Tue, 18 Dec 2012 15:02:47 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBIK2kg0020298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Dec 2012 15:02:46 -0500 Received: from blackpad.lan.raisama.net (vpn1-6-125.gru2.redhat.com [10.97.6.125]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBIK2j69002269 for ; Tue, 18 Dec 2012 15:02:46 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 750B02036F3; Tue, 18 Dec 2012 18:04:19 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 18 Dec 2012 18:04:10 -0200 Message-Id: <1355861053-11460-18-git-send-email-ehabkost@redhat.com> In-Reply-To: <1355861053-11460-1-git-send-email-ehabkost@redhat.com> References: <1355861053-11460-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 17/20] target-m68k: replace cpu_m68k_init() with generic_cpu_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Eduardo Habkost --- target-m68k/cpu.h | 3 +-- target-m68k/helper.c | 14 -------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h index 9823267..3573c05 100644 --- a/target-m68k/cpu.h +++ b/target-m68k/cpu.h @@ -116,7 +116,6 @@ typedef struct CPUM68KState { #include "cpu-qom.h" void m68k_tcg_init(void); -CPUState *cpu_m68k_init(const char *cpu_model); int cpu_m68k_exec(CPUM68KState *s); void do_interrupt(CPUM68KState *env1); void do_interrupt_m68k_hardirq(CPUM68KState *env1); @@ -214,7 +213,7 @@ void register_m68k_insns (CPUM68KState *env); #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 -#define cpu_init cpu_m68k_init +#define cpu_init(m) generic_cpu_init(TYPE_M68K_CPU, m) #define cpu_exec cpu_m68k_exec #define cpu_gen_code cpu_m68k_gen_code #define cpu_signal_handler cpu_m68k_signal_handler diff --git a/target-m68k/helper.c b/target-m68k/helper.c index f122706..6026c09 100644 --- a/target-m68k/helper.c +++ b/target-m68k/helper.c @@ -70,20 +70,6 @@ void m68k_cpu_list(FILE *f, fprintf_function cpu_fprintf) g_slist_free(list); } -CPUState *cpu_m68k_init(const char *cpu_model) -{ - M68kCPU *cpu; - - if (object_class_by_name(cpu_model) == NULL) { - return NULL; - } - cpu = M68K_CPU(object_new(cpu_model)); - CPU(cpu)->cpu_model_str = cpu_model; - cpu_realize(CPU(cpu), NULL); - - return CPU(cpu); -} - void cpu_m68k_flush_flags(CPUM68KState *env, int cc_op) { int flags;