From: Philippe Mathieu-Daudé <philmd@linaro.org>
For all targets, the CPU class returned from CPUClass::class_by_name()
and object_class_dynamic_cast(oc, CPU_RESOLVING_TYPE) need to be
compatible. Lets apply the check in cpu_class_by_name() for once,
instead of having the check in CPUClass::class_by_name() for individual
target.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/core/cpu-common.c | 8 +++++---
target/alpha/cpu.c | 3 ---
target/arm/cpu.c | 4 +---
target/avr/cpu.c | 8 +-------
target/cris/cpu.c | 4 +---
target/hexagon/cpu.c | 4 +---
target/hppa/cpu.c | 7 +------
target/loongarch/cpu.c | 8 +-------
target/m68k/cpu.c | 4 +---
target/openrisc/cpu.c | 4 +---
target/riscv/cpu.c | 4 +---
target/tricore/cpu.c | 4 +---
target/xtensa/cpu.c | 4 +---
13 files changed, 16 insertions(+), 50 deletions(-)