[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsin
From: |
Stafford Horne |
Subject: |
Re: [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsing |
Date: |
Sat, 7 Oct 2017 09:13:40 +0900 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Thu, Oct 05, 2017 at 03:50:52PM +0200, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Less lines of code, thanks.
Acked-by: Stafford Horne <address@hidden>
> ---
> CC: address@hidden
> ---
> hw/openrisc/openrisc_sim.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
> index 86bf284..f61b63d 100644
> --- a/hw/openrisc/openrisc_sim.c
> +++ b/hw/openrisc/openrisc_sim.c
> @@ -98,18 +98,13 @@ static void cpu_openrisc_load_kernel(ram_addr_t ram_size,
> static void openrisc_sim_init(MachineState *machine)
> {
> ram_addr_t ram_size = machine->ram_size;
> - const char *cpu_model = machine->cpu_model;
> const char *kernel_filename = machine->kernel_filename;
> OpenRISCCPU *cpu = NULL;
> MemoryRegion *ram;
> int n;
>
> - if (!cpu_model) {
> - cpu_model = "or1200";
> - }
> -
> for (n = 0; n < smp_cpus; n++) {
> - cpu = OPENRISC_CPU(cpu_generic_init(TYPE_OPENRISC_CPU, cpu_model));
> + cpu = OPENRISC_CPU(cpu_create(machine->cpu_type));
> qemu_register_reset(main_cpu_reset, cpu);
> main_cpu_reset(cpu);
> }
> @@ -138,6 +133,7 @@ static void openrisc_sim_machine_init(MachineClass *mc)
> mc->init = openrisc_sim_init;
> mc->max_cpus = 1;
> mc->is_default = 1;
> + mc->default_cpu_type = OPENRISC_CPU_TYPE_NAME("or1200");
> }
>
> DEFINE_MACHINE("or1k-sim", openrisc_sim_machine_init)
> --
> 2.7.4
>
- [Qemu-devel] [PATCH v2 07/40] cris: use generic cpu_model parsing, (continued)
- [Qemu-devel] [PATCH v2 07/40] cris: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 08/40] lm32: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 05/40] alpha: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 10/40] lm32: lm32_boards: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 09/40] lm32: milkymist: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 13/40] m68k: mcf5208: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 12/40] m68k: an5206: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 11/40] m68k: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 15/40] moxie: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- Re: [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsing,
Stafford Horne <=
- [Qemu-devel] [PATCH v2 14/40] moxie: fix qemu-system-moxie failing to start with CLI "-cpu MoxieLite", Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 19/40] sh4: r2d: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 16/40] moxie: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 17/40] openrisc: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 22/40] sh4: simplify superh_cpu_class_by_name(), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 23/40] sh4: remove SuperHCPUClass::name field, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 20/40] sh4: shix: use generic cpu_model parsing, Igor Mammedov, 2017/10/05