[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 20/40] sh4: shix: use generic cpu_model parsing
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 20/40] sh4: shix: use generic cpu_model parsing |
Date: |
Thu, 5 Oct 2017 15:50:54 +0200 |
default cpu model 'any' resolves to type TYPE_SH7750R_CPU
in superh_cpu_class_by_name(), so use it directly.
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Philippe Mathieu-Daudé <address@hidden>
---
v2:
- Explain in commit message why default cpu model 'any' is
replaced by TYPE_SH7750R_CPU (Philippe Mathieu-Daudé)
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;
}
DEFINE_MACHINE("shix", shix_machine_init)
--
2.7.4
- Re: [Qemu-devel] [PATCH v2 18/40] openrisc: use generic cpu_model parsing, (continued)
- [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 <=
- [Qemu-devel] [PATCH v2 24/40] xtensa: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 21/40] sh4: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 25/40] xtensa: sim: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 26/40] xtensa: lx60/lx200/ml605/kc705: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 29/40] tricore: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 28/40] unicore32: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 27/40] unicore32: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 31/40] sparc: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 30/40] tricore: use generic cpu_model parsing, Igor Mammedov, 2017/10/05