diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-04-22 10:32:31 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-04-25 17:00:41 +0200 |
| commit | d5f241834be1b323ea697a469ff0f1335a1823fe (patch) | |
| tree | 904b5a4eeaf7682a558dcf62853f80ea03c4ec2b /target/ppc/cpu_init.c | |
| parent | 7748cdbae899f54f672e2e5ecd2c556c256b2b08 (diff) | |
| download | focaccia-qemu-d5f241834be1b323ea697a469ff0f1335a1823fe.tar.gz focaccia-qemu-d5f241834be1b323ea697a469ff0f1335a1823fe.zip | |
hw/core: Get default_cpu_type calling machine_class_default_cpu_type()
Since commit 62b4a227a33 the default cpu type can come from the
valid_cpu_types[] array. Call the machine_class_default_cpu_type()
instead of accessing MachineClass::default_cpu_type field.
Cc: qemu-stable@nongnu.org
Fixes: 62b4a227a33 ("hw/core: Add machine_class_default_cpu_type()")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20250422084114.39499-1-philmd@linaro.org>
Diffstat (limited to 'target/ppc/cpu_init.c')
| -rw-r--r-- | target/ppc/cpu_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index aed9e26599..b0973b6df9 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7082,7 +7082,7 @@ ObjectClass *ppc_cpu_class_by_name(const char *name) if (strcmp(name, "max") == 0) { MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); if (mc) { - return object_class_by_name(mc->default_cpu_type); + return object_class_by_name(machine_class_default_cpu_type(mc)); } } #endif |