qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 03/31] cpu: Call object_class_dynamic_cast() once in cpu_c


From: Richard Henderson
Subject: Re: [PATCH v5 03/31] cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()
Date: Tue, 14 Nov 2023 16:30:26 -0800
User-agent: Mozilla Thunderbird

On 11/14/23 15:56, Gavin Shan wrote:
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(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]