[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 18/38] sh4: shix: use generic cpu_model parsing
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 18/38] sh4: shix: use generic cpu_model parsing |
Date: |
Thu, 5 Oct 2017 09:48:06 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
Hi Igor,
On 10/02/2017 06:08 AM, Igor Mammedov wrote:
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> CC: Magnus Damm <address@hidden>
> CC: Aurelien Jarno <address@hidden>
> ---
> hw/sh4/shix.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
> index 50ee36a..4add230 100644
> --- a/hw/sh4/shix.c
> +++ b/hw/sh4/shix.c
> @@ -45,7 +45,6 @@
>
> static void shix_init(MachineState *machine)
> {
> - const char *cpu_model = machine->cpu_model;
> int ret;
> SuperHCPU *cpu;
> struct SH7750State *s;
> @@ -53,10 +52,7 @@ static void shix_init(MachineState *machine)
> MemoryRegion *rom = g_new(MemoryRegion, 1);
> MemoryRegion *sdram = g_new(MemoryRegion, 2);
>
> - if (!cpu_model)
> - cpu_model = "any";
> -
> - cpu = SUPERH_CPU(cpu_generic_init(TYPE_SUPERH_CPU, cpu_model));
> + cpu = SUPERH_CPU(cpu_create(machine->cpu_type));
>
> /* Allocate memory space */
> memory_region_init_ram(rom, NULL, "shix.rom", 0x4000, &error_fatal);
> @@ -89,6 +85,7 @@ static void shix_machine_init(MachineClass *mc)
> mc->desc = "shix card";
> mc->init = shix_init;
> mc->is_default = 1;
> + mc->default_cpu_type = TYPE_SH7750R_CPU;
Maybe worth a comment explaining this.
After checking superh_cpu_class_by_name():
Acked-by: Philippe Mathieu-Daudé <address@hidden>
> }
>
> DEFINE_MACHINE("shix", shix_machine_init)
>
- Re: [Qemu-devel] [PATCH 14/38] moxie: use generic cpu_model parsing, (continued)
- [Qemu-devel] [PATCH 12/38] moxie: fix qemu-system-moxie failing to start with CLI "-cpu MoxieLite", Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 13/38] moxie: cleanup cpu type name composition, Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 17/38] sh4: r2d: use generic cpu_model parsing, Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 16/38] openrisc: use generic cpu_model parsing, Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 18/38] sh4: shix: use generic cpu_model parsing, Igor Mammedov, 2017/10/02
- Re: [Qemu-devel] [PATCH 18/38] sh4: shix: use generic cpu_model parsing,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 15/38] openrisc: cleanup cpu type name composition, Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 20/38] sh4: simplify superh_cpu_class_by_name(), Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 19/38] sh4: cleanup cpu type name composition, Igor Mammedov, 2017/10/02
- [Qemu-devel] [PATCH 22/38] xtensa: cleanup cpu type name composition, Igor Mammedov, 2017/10/02