Skip to content

Commit

Permalink
tricore: replace cpu_tricore_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-17-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 8e36271 commit a697731
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion hw/tricore/tricore_testboard.c
Expand Up @@ -74,7 +74,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id)
if (!machine->cpu_model) {
machine->cpu_model = "tc1796";
}
cpu = cpu_tricore_init(machine->cpu_model);
cpu = TRICORE_CPU(cpu_generic_init(TYPE_TRICORE_CPU, machine->cpu_model));
if (!cpu) {
error_report("Unable to find CPU definition");
exit(1);
Expand Down
4 changes: 1 addition & 3 deletions target/tricore/cpu.h
Expand Up @@ -411,9 +411,7 @@ static inline void cpu_get_tb_cpu_state(CPUTriCoreState *env, target_ulong *pc,
*flags = 0;
}

TriCoreCPU *cpu_tricore_init(const char *cpu_model);

#define cpu_init(cpu_model) CPU(cpu_tricore_init(cpu_model))
#define cpu_init(cpu_model) cpu_generic_init(TYPE_TRICORE_CPU, cpu_model)


/* helpers.c */
Expand Down
5 changes: 0 additions & 5 deletions target/tricore/helper.c
Expand Up @@ -78,11 +78,6 @@ int cpu_tricore_handle_mmu_fault(CPUState *cs, target_ulong address,
return ret;
}

TriCoreCPU *cpu_tricore_init(const char *cpu_model)
{
return TRICORE_CPU(cpu_generic_init(TYPE_TRICORE_CPU, cpu_model));
}

static void tricore_cpu_list_entry(gpointer data, gpointer user_data)
{
ObjectClass *oc = data;
Expand Down

0 comments on commit a697731

Please sign in to comment.