hw/xtensa_sim: get rid of intermediate xtensa_sim_init
Remove xtensa_sim_init that only explodes machine init args, rename sim_init to xtensa_sim_init. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
d64ed08eec
commit
50cd721482
@ -44,16 +44,20 @@ static void sim_reset(void *opaque)
|
||||
cpu_reset(CPU(cpu));
|
||||
}
|
||||
|
||||
static void sim_init(ram_addr_t ram_size,
|
||||
const char *boot_device,
|
||||
const char *kernel_filename, const char *kernel_cmdline,
|
||||
const char *initrd_filename, const char *cpu_model)
|
||||
static void xtensa_sim_init(QEMUMachineInitArgs *args)
|
||||
{
|
||||
XtensaCPU *cpu = NULL;
|
||||
CPUXtensaState *env = NULL;
|
||||
MemoryRegion *ram, *rom;
|
||||
ram_addr_t ram_size = args->ram_size;
|
||||
const char *cpu_model = args->cpu_model;
|
||||
const char *kernel_filename = args->kernel_filename;
|
||||
int n;
|
||||
|
||||
if (!cpu_model) {
|
||||
cpu_model = XTENSA_DEFAULT_CPU_MODEL;
|
||||
}
|
||||
|
||||
for (n = 0; n < smp_cpus; n++) {
|
||||
cpu = cpu_xtensa_init(cpu_model);
|
||||
if (cpu == NULL) {
|
||||
@ -96,21 +100,6 @@ static void sim_init(ram_addr_t ram_size,
|
||||
}
|
||||
}
|
||||
|
||||
static void xtensa_sim_init(QEMUMachineInitArgs *args)
|
||||
{
|
||||
ram_addr_t ram_size = args->ram_size;
|
||||
const char *cpu_model = args->cpu_model;
|
||||
const char *kernel_filename = args->kernel_filename;
|
||||
const char *kernel_cmdline = args->kernel_cmdline;
|
||||
const char *initrd_filename = args->initrd_filename;
|
||||
const char *boot_device = args->boot_device;
|
||||
if (!cpu_model) {
|
||||
cpu_model = XTENSA_DEFAULT_CPU_MODEL;
|
||||
}
|
||||
sim_init(ram_size, boot_device, kernel_filename, kernel_cmdline,
|
||||
initrd_filename, cpu_model);
|
||||
}
|
||||
|
||||
static QEMUMachine xtensa_sim_machine = {
|
||||
.name = "sim",
|
||||
.desc = "sim machine (" XTENSA_DEFAULT_CPU_MODEL ")",
|
||||
|
Loading…
Reference in New Issue
Block a user