diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2015-09-04 15:37:04 -0300 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-09-19 16:39:44 +0200 |
commit | ca17776088e41dabdc3bb07334dbc73d631e30e3 (patch) | |
tree | 13ade1446f2ea36987d2eabb090e0f8cd13855f4 /hw/arm/exynos4_boards.c | |
parent | 6aadcc71354bc683fdedd8a3d369095d23095e1c (diff) |
exynos4: Use MachineClass instead of exynos4_machines array
We don't need a QEMUMachine array to query max_cpus, if we can get the
corresponding MachineClass.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/arm/exynos4_boards.c')
-rw-r--r-- | hw/arm/exynos4_boards.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index 3f88c4a330..312a0142f0 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exynos4_boards.c @@ -97,10 +97,12 @@ static void lan9215_init(uint32_t base, qemu_irq irq) static Exynos4210State *exynos4_boards_init_common(MachineState *machine, Exynos4BoardType board_type) { + MachineClass *mc = MACHINE_GET_CLASS(machine); + if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) { fprintf(stderr, "%s board supports only %d CPU cores. Ignoring smp_cpus" " value.\n", - exynos4_machines[board_type].name, EXYNOS4210_NCPUS); + mc->name, EXYNOS4210_NCPUS); } exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type]; |