qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 26/38] unicore32: use generic cpu_model parsing


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 26/38] unicore32: use generic cpu_model parsing
Date: Mon, 2 Oct 2017 17:18:33 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/02/2017 06:08 AM, Igor Mammedov wrote:
Signed-off-by: Igor Mammedov <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

---
CC: Guan Xuetao <address@hidden>
---
  hw/unicore32/puv3.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index 504ea46..1b39cc0 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -112,7 +112,6 @@ static void puv3_load_kernel(const char *kernel_filename)
  static void puv3_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;
      const char *initrd_filename = machine->initrd_filename;
      CPUUniCore32State *env;
@@ -123,11 +122,7 @@ static void puv3_init(MachineState *machine)
          exit(1);
      }
- if (!cpu_model) {
-        cpu_model = "UniCore-II";
-    }
-
-    cpu = UNICORE32_CPU(cpu_generic_init(TYPE_UNICORE32_CPU, cpu_model));
+    cpu = UNICORE32_CPU(cpu_create(machine->cpu_type));
      env = &cpu->env;
puv3_soc_init(env);
@@ -140,6 +135,7 @@ static void puv3_machine_init(MachineClass *mc)
      mc->desc = "PKUnity Version-3 based on UniCore32";
      mc->init = puv3_init;
      mc->is_default = 1;
+    mc->default_cpu_type = UNICORE32_CPU_TYPE_NAME("UniCore-II");
  }
DEFINE_MACHINE("puv3", puv3_machine_init)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]