diff mbox series

[19/24] tilegx: cpu: add TARGET_DEFAULT_CPU_TYPE macro

Message ID 1516203816-19374-20-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
It will be used to drop a bunch of ifdefs *-user/main.c that
set default cpu_model in favor of using type names directly.

For tilegx, *-user defaulted to bogus 'any', however
tilegx_cpu_class_by_name() is ignoring invalid values and always
returns TYPE_TILEGX_CPU, so use it for TARGET_DEFAULT_CPU_TYPE

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
CC: Eduardo Habkost <ehabkost@redhat.com>
---
 target/tilegx/cpu.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h
index 71cea04..67de53e 100644
--- a/target/tilegx/cpu.h
+++ b/target/tilegx/cpu.h
@@ -165,6 +165,7 @@  void tilegx_tcg_init(void);
 int cpu_tilegx_signal_handler(int host_signum, void *pinfo, void *puc);
 
 #define cpu_init(cpu_model) cpu_generic_init(TYPE_TILEGX_CPU, cpu_model)
+#define TARGET_DEFAULT_CPU_TYPE TYPE_TILEGX_CPU
 
 #define cpu_signal_handler cpu_tilegx_signal_handler