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>
This commit is contained in:
Eduardo Habkost 2015-09-04 15:37:04 -03:00 committed by Andreas Färber
parent 6aadcc7135
commit ca17776088
1 changed files with 3 additions and 1 deletions

View File

@ -97,10 +97,12 @@ static void lan9215_init(uint32_t base, qemu_irq irq)
static Exynos4210State *exynos4_boards_init_common(MachineState *machine, static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
Exynos4BoardType board_type) Exynos4BoardType board_type)
{ {
MachineClass *mc = MACHINE_GET_CLASS(machine);
if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) { if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) {
fprintf(stderr, "%s board supports only %d CPU cores. Ignoring smp_cpus" fprintf(stderr, "%s board supports only %d CPU cores. Ignoring smp_cpus"
" value.\n", " value.\n",
exynos4_machines[board_type].name, EXYNOS4210_NCPUS); mc->name, EXYNOS4210_NCPUS);
} }
exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type]; exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];