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 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/sbsa-ref.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/arm/sbsa-ref.c') diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index e98e9a5170..1c1a2b662d 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -711,13 +711,12 @@ static void sbsa_ref_init(MachineState *machine) create_pcie(sms, pic); sms->bootinfo.ram_size = machine->ram_size; - sms->bootinfo.kernel_filename = machine->kernel_filename; sms->bootinfo.nb_cpus = smp_cpus; sms->bootinfo.board_id = -1; sms->bootinfo.loader_start = sbsa_ref_memmap[SBSA_MEM].base; sms->bootinfo.get_dtb = sbsa_ref_dtb; sms->bootinfo.firmware_loaded = firmware_loaded; - arm_load_kernel(ARM_CPU(first_cpu), &sms->bootinfo); + arm_load_kernel(ARM_CPU(first_cpu), machine, &sms->bootinfo); } static uint64_t sbsa_ref_cpu_mp_affinity(SBSAMachineState *sms, int idx) -- cgit v1.2.3-55-g7522