From 2744ece8095b8cdb0d667654debc1d80dd57bbd3 Mon Sep 17 00:00:00 2001 From: Tao Xu Date: Fri, 9 Aug 2019 14:57:21 +0800 Subject: hw/arm: simplify arm_load_dtb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In struct arm_boot_info, kernel_filename, initrd_filename and kernel_cmdline are copied from from MachineState. This patch add MachineState as a parameter into arm_load_dtb() and move the copy chunk of kernel_filename, initrd_filename and kernel_cmdline into arm_load_kernel(). Reviewed-by: Igor Mammedov Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Signed-off-by: Tao Xu Message-Id: <20190809065731.9097-2-tao3.xu@intel.com> Reviewed-by: Alistair Francis Acked-by: Andrew Jeffery Acked-by: Cédric Le Goater [ehabkost: include hw/boards.h again to fix build failures] Signed-off-by: Eduardo Habkost --- hw/arm/mainstone.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'hw/arm/mainstone.c') diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c index 1bad1aea76..b01ce3ce08 100644 --- a/hw/arm/mainstone.c +++ b/hw/arm/mainstone.c @@ -176,11 +176,8 @@ static void mainstone_common_init(MemoryRegion *address_space_mem, smc91c111_init(&nd_table[0], MST_ETH_PHYS, qdev_get_gpio_in(mst_irq, ETHERNET_IRQ)); - mainstone_binfo.kernel_filename = machine->kernel_filename; - mainstone_binfo.kernel_cmdline = machine->kernel_cmdline; - mainstone_binfo.initrd_filename = machine->initrd_filename; mainstone_binfo.board_id = arm_id; - arm_load_kernel(mpu->cpu, &mainstone_binfo); + arm_load_kernel(mpu->cpu, machine, &mainstone_binfo); } static void mainstone_init(MachineState *machine) -- cgit v1.2.3