Patchwork [RFC,17/20] target-m68k: replace cpu_m68k_init() with generic_cpu_init()

login
register
mail settings
Submitter Eduardo Habkost
Date Dec. 18, 2012, 8:04 p.m.
Message ID <1355861053-11460-18-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/207194/
State New
Headers show

Comments

Eduardo Habkost - Dec. 18, 2012, 8:04 p.m.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target-m68k/cpu.h    |  3 +--
 target-m68k/helper.c | 14 --------------
 2 files changed, 1 insertion(+), 16 deletions(-)

Patch

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;