[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/36] hw/mips/loongson3_virt: Propagate cpu_count to init_boot_pa
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 08/36] hw/mips/loongson3_virt: Propagate cpu_count to init_boot_param() |
Date: |
Fri, 31 Jan 2025 22:04:51 +0100 |
Remove one use of the 'current_machine' global.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250115232952.31166-8-philmd@linaro.org>
---
hw/mips/loongson3_virt.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index eb2a6a248d8..5fe5bc6fc03 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -173,7 +173,7 @@ static uint64_t get_cpu_freq_hz(const MIPSCPU *cpu)
return DEF_LOONGSON3_FREQ;
}
-static void init_boot_param(void)
+static void init_boot_param(unsigned cpu_count)
{
static void *p;
struct boot_params *bp;
@@ -184,8 +184,7 @@ static void init_boot_param(void)
bp->efi.smbios.vers = cpu_to_le16(1);
init_reset_system(&(bp->reset_system));
p += ROUND_UP(sizeof(struct boot_params), 64);
- init_loongson_params(&(bp->efi.smbios.lp), p,
- current_machine->smp.cpus,
+ init_loongson_params(&(bp->efi.smbios.lp), p, cpu_count,
loaderparams.cpu_freq, loaderparams.ram_size);
rom_add_blob_fixed("params_rom", bp,
@@ -643,7 +642,7 @@ static void mips_loongson3_virt_init(MachineState *machine)
loaderparams.kernel_entry = load_kernel(&cpu->env);
init_boot_rom();
- init_boot_param();
+ init_boot_param(machine->smp.cpus);
} else {
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
machine->firmware ?: LOONGSON3_BIOSNAME);
--
2.47.1
- [PULL 00/36] Misc HW patches for 2025-01-31, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 01/36] hw/rx/rx-gdbsim: Remove unnecessary uses of &first_cpu, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 02/36] hw/mips/loongson3_virt: Factor generic_cpu_reset() out, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 03/36] hw/mips/loongson3_virt: Invert vCPU creation order to remove &first_cpu, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 04/36] hw/mips/loongson3_virt: Have fw_conf_init() access local loaderparams, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 05/36] hw/mips/loongson3_virt: Pass CPU argument to get_cpu_freq_hz(), Philippe Mathieu-Daudé, 2025/01/31
- [PULL 06/36] hw/mips/loongson3_bootp: Include missing headers, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 07/36] hw/mips/loongson3: Propagate cpu_count to init_loongson_params(), Philippe Mathieu-Daudé, 2025/01/31
- [PULL 08/36] hw/mips/loongson3_virt: Propagate cpu_count to init_boot_param(),
Philippe Mathieu-Daudé <=
- [PULL 09/36] hw/mips/loongson3_bootp: Propagate processor_id to init_cpu_info(), Philippe Mathieu-Daudé, 2025/01/31
- [PULL 10/36] hw/mips/loongson3_virt: Propagate processor_id to init_loongson_params(), Philippe Mathieu-Daudé, 2025/01/31
- [PULL 11/36] hw/mips/loongson3_virt: Propagate %processor_id to init_boot_param(), Philippe Mathieu-Daudé, 2025/01/31
- [PULL 12/36] hw/mips/loongson3_bootp: Move to common_ss[], Philippe Mathieu-Daudé, 2025/01/31
- [PULL 13/36] hw/irq: Introduce qemu_init_irqs() helper, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 14/36] hw/ipack: Clarify KConfig symbols, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 15/36] hw/ipack: Remove legacy qemu_allocate_irqs() use, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 16/36] hw/sh4/r2d: Convert legacy qemu_allocate_irqs() to qemu_init_irqs(), Philippe Mathieu-Daudé, 2025/01/31
- [PULL 17/36] hw/char/pci-multi: Convert legacy qemu_allocate_irqs to qemu_init_irq, Philippe Mathieu-Daudé, 2025/01/31
- [PULL 18/36] hw/misc/i2c-echo: add tracing, Philippe Mathieu-Daudé, 2025/01/31