diff mbox series

[17/24] xtensa: cpu: rename XTENSA_DEFAULT_CPU_TYPE to TARGET_DEFAULT_CPU_TYPE

Message ID 1516203816-19374-18-git-send-email-imammedo@redhat.com
State New
Headers show
Series generalize parsing of cpu_model (part 4) | expand

Commit Message

Igor Mammedov Jan. 17, 2018, 3:43 p.m. UTC
so naming would be in line with other targets and null-machine.c which
uses the later would compile.

Later it also would be used as default for *-user targets which is
currently bogus cpu model 'any', that errors out.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
CC: Max Filippov <jcmvbkbc@gmail.com>
---
 target/xtensa/cpu.h | 2 +-
 hw/xtensa/sim.c     | 2 +-
 hw/xtensa/xtfpga.c  | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Max Filippov Jan. 17, 2018, 5:35 p.m. UTC | #1
On Wed, Jan 17, 2018 at 7:43 AM, Igor Mammedov <imammedo@redhat.com> wrote:
> so naming would be in line with other targets and null-machine.c which
> uses the later would compile.
>
> Later it also would be used as default for *-user targets which is
> currently bogus cpu model 'any', that errors out.
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> CC: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  target/xtensa/cpu.h | 2 +-
>  hw/xtensa/sim.c     | 2 +-
>  hw/xtensa/xtfpga.c  | 8 ++++----
>  3 files changed, 6 insertions(+), 6 deletions(-)

Acked-by: Max Filippov <jcmvbkbc@gmail.com>
diff mbox series

Patch

diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index d9404aa..537e151 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -506,7 +506,7 @@  void xtensa_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
 #else
 #define XTENSA_DEFAULT_CPU_MODEL "dc232b"
 #endif
-#define XTENSA_DEFAULT_CPU_TYPE XTENSA_CPU_TYPE_NAME(XTENSA_DEFAULT_CPU_MODEL)
+#define TARGET_DEFAULT_CPU_TYPE XTENSA_CPU_TYPE_NAME(XTENSA_DEFAULT_CPU_MODEL)
 
 #define cpu_init(cpu_model) cpu_generic_init(TYPE_XTENSA_CPU, cpu_model)
 
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 2bb883b..58a79bd 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -128,7 +128,7 @@  static void xtensa_sim_machine_init(MachineClass *mc)
     mc->init = xtensa_sim_init;
     mc->max_cpus = 4;
     mc->no_serial = 1;
-    mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
 }
 
 DEFINE_MACHINE("sim", xtensa_sim_machine_init)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 1971ecf..c2b0aa4 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -449,7 +449,7 @@  static void xtensa_lx60_class_init(ObjectClass *oc, void *data)
     mc->desc = "lx60 EVB (" XTENSA_DEFAULT_CPU_MODEL ")";
     mc->init = xtensa_lx60_init;
     mc->max_cpus = 4;
-    mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
 }
 
 static const TypeInfo xtensa_lx60_type = {
@@ -465,7 +465,7 @@  static void xtensa_lx200_class_init(ObjectClass *oc, void *data)
     mc->desc = "lx200 EVB (" XTENSA_DEFAULT_CPU_MODEL ")";
     mc->init = xtensa_lx200_init;
     mc->max_cpus = 4;
-    mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
 }
 
 static const TypeInfo xtensa_lx200_type = {
@@ -481,7 +481,7 @@  static void xtensa_ml605_class_init(ObjectClass *oc, void *data)
     mc->desc = "ml605 EVB (" XTENSA_DEFAULT_CPU_MODEL ")";
     mc->init = xtensa_ml605_init;
     mc->max_cpus = 4;
-    mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
 }
 
 static const TypeInfo xtensa_ml605_type = {
@@ -497,7 +497,7 @@  static void xtensa_kc705_class_init(ObjectClass *oc, void *data)
     mc->desc = "kc705 EVB (" XTENSA_DEFAULT_CPU_MODEL ")";
     mc->init = xtensa_kc705_init;
     mc->max_cpus = 4;
-    mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
 }
 
 static const TypeInfo xtensa_kc705_type = {