Patchwork [RFC,19/20] target-unicore32: replace uc32_cpu_init() with generic_cpu_init()

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

Comments

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

Patch

diff --git a/target-unicore32/cpu.h b/target-unicore32/cpu.h
index 43bdd84..ad6fee4 100644
--- a/target-unicore32/cpu.h
+++ b/target-unicore32/cpu.h
@@ -122,7 +122,7 @@  void cpu_asr_write(CPUUniCore32State *env1, target_ulong val, target_ulong mask)
 #define UC32_HWCAP_CMOV                 4 /* 1 << 2 */
 #define UC32_HWCAP_UCF64                8 /* 1 << 3 */
 
-#define cpu_init                        uc32_cpu_init
+#define cpu_init(m)                     generic_cpu_init(TYPE_UNICORE32_CPU, m)
 #define cpu_exec                        uc32_cpu_exec
 #define cpu_signal_handler              uc32_cpu_signal_handler
 #define cpu_handle_mmu_fault            uc32_cpu_handle_mmu_fault
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c
index 927e591..731bd5c 100644
--- a/target-unicore32/helper.c
+++ b/target-unicore32/helper.c
@@ -23,18 +23,6 @@ 
 #define DPRINTF(fmt, ...) do {} while (0)
 #endif
 
-CPUState *uc32_cpu_init(const char *cpu_model)
-{
-    UniCore32CPU *cpu;
-
-    if (object_class_by_name(cpu_model) == NULL) {
-        return NULL;
-    }
-    cpu = UNICORE32_CPU(object_new(cpu_model));
-    cpu_realize(CPU(cpu), NULL);
-    return CPU(cpu);
-}
-
 uint32_t HELPER(clo)(uint32_t x)
 {
     return clo32(x);