[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 34/40] sparc: leon3: use generic cpu_model parsin
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 34/40] sparc: leon3: use generic cpu_model parsing |
Date: |
Thu, 5 Oct 2017 15:51:08 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
---
CC: address@hidden
CC: address@hidden
CC: address@hidden
---
hw/sparc/leon3.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index ec2816b..8c66d5a 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -107,7 +107,6 @@ static void leon3_set_pil_in(void *opaque, uint32_t pil_in)
static void leon3_generic_hw_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;
SPARCCPU *cpu;
CPUSPARCState *env;
@@ -122,11 +121,7 @@ static void leon3_generic_hw_init(MachineState *machine)
ResetData *reset_info;
/* Init CPU */
- if (!cpu_model) {
- cpu_model = "LEON3";
- }
-
- cpu = SPARC_CPU(cpu_generic_init(TYPE_SPARC_CPU, cpu_model));
+ cpu = SPARC_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
cpu_sparc_set_id(env, 0);
@@ -222,6 +217,7 @@ static void leon3_generic_machine_init(MachineClass *mc)
{
mc->desc = "Leon-3 generic";
mc->init = leon3_generic_hw_init;
+ mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3");
}
DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init)
--
2.7.4
- [Qemu-devel] [PATCH v2 27/40] unicore32: cleanup cpu type name composition, (continued)
- [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
- [Qemu-devel] [PATCH v2 32/40] sparc: sun4u/sun4v/niagara: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 33/40] sparc: sparc: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 34/40] sparc: leon3: use generic cpu_model parsing,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 35/40] mips: use object_new() instead of gnew()+object_initialize(), Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 37/40] mips: fulong2e: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 40/40] mips: r4k: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 36/40] mips: malta/boston: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 38/40] mips: Magnum/Acer Pica 61: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 39/40] mips: mipssim: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/05
- Re: [Qemu-devel] [PATCH v2 00/40] generalize parsing of cpu_model (part 2), Igor Mammedov, 2017/10/12