Skip to content

Commit

Permalink
unicore32: replace uc32_cpu_init() with cpu_generic_init()
Browse files Browse the repository at this point in the history
it's just a wrapper, drop it and use cpu_generic_init() directly

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1503592308-93913-25-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
  • Loading branch information
Igor Mammedov authored and ehabkost committed Sep 1, 2017
1 parent f6f8b26 commit 13b884e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion hw/unicore32/puv3.c
Expand Up @@ -127,7 +127,7 @@ static void puv3_init(MachineState *machine)
cpu_model = "UniCore-II";
}

cpu = uc32_cpu_init(cpu_model);
cpu = UNICORE32_CPU(cpu_generic_init(TYPE_UNICORE32_CPU, cpu_model));
if (!cpu) {
error_report("Unable to find CPU definition");
exit(1);
Expand Down
4 changes: 1 addition & 3 deletions target/unicore32/cpu.h
Expand Up @@ -165,9 +165,7 @@ static inline int cpu_mmu_index(CPUUniCore32State *env, bool ifetch)

#include "exec/cpu-all.h"

UniCore32CPU *uc32_cpu_init(const char *cpu_model);

#define cpu_init(cpu_model) CPU(uc32_cpu_init(cpu_model))
#define cpu_init(cpu_model) cpu_generic_init(TYPE_UNICORE32_CPU, cpu_model)

static inline void cpu_get_tb_cpu_state(CPUUniCore32State *env, target_ulong *pc,
target_ulong *cs_base, uint32_t *flags)
Expand Down
5 changes: 0 additions & 5 deletions target/unicore32/helper.c
Expand Up @@ -27,11 +27,6 @@
#define DPRINTF(fmt, ...) do {} while (0)
#endif

UniCore32CPU *uc32_cpu_init(const char *cpu_model)
{
return UNICORE32_CPU(cpu_generic_init(TYPE_UNICORE32_CPU, cpu_model));
}

#ifndef CONFIG_USER_ONLY
void helper_cp0_set(CPUUniCore32State *env, uint32_t val, uint32_t creg,
uint32_t cop)
Expand Down

0 comments on commit 13b884e

Please sign in to comment.