Skip to content

Commit

Permalink
target/hppa: Use generic cpu_list()
Browse files Browse the repository at this point in the history
No changes in the output from the following command.

[gshan@gshan q]$ ./build/qemu-system-hppa -cpu ?
Available CPUs:
  hppa
  hppa64

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20231114235628.534334-13-gshan@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  • Loading branch information
Gavin Shan authored and philmd committed Jan 5, 2024
1 parent ee0b8ce commit d33fc71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
24 changes: 0 additions & 24 deletions target/hppa/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,30 +164,6 @@ static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model)
return object_class_by_name(typename);
}

static void hppa_cpu_list_entry(gpointer data, gpointer user_data)
{
ObjectClass *oc = data;
CPUClass *cc = CPU_CLASS(oc);
const char *tname = object_class_get_name(oc);
g_autofree char *name = g_strndup(tname, strchr(tname, '-') - tname);

if (cc->deprecation_note) {
qemu_printf(" %s (deprecated)\n", name);
} else {
qemu_printf(" %s\n", name);
}
}

void hppa_cpu_list(void)
{
GSList *list;

list = object_class_get_list_sorted(TYPE_HPPA_CPU, false);
qemu_printf("Available CPUs:\n");
g_slist_foreach(list, hppa_cpu_list_entry, NULL);
g_slist_free(list);
}

#ifndef CONFIG_USER_ONLY
#include "hw/core/sysemu-cpu-ops.h"

Expand Down
3 changes: 0 additions & 3 deletions target/hppa/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,4 @@ G_NORETURN void hppa_dynamic_excp(CPUHPPAState *env, int excp, uintptr_t ra);

#define CPU_RESOLVING_TYPE TYPE_HPPA_CPU

#define cpu_list hppa_cpu_list
void hppa_cpu_list(void);

#endif /* HPPA_CPU_H */

0 comments on commit d33fc71

Please sign in to comment.