aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-10-30 10:11:22 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-10-30 10:11:22 +0000
commitab752f237d755897735dc755182f60af39cbc5b6 (patch)
treec7c3ad0f9daf8405cf475730801421b5643e75f5 /target/xtensa
parent953e35f69c302522c280e8d4e05995afc31da051 (diff)
parent1a26f46692320f1981c95967e0d5af4443b5f0b1 (diff)
downloadqemu-ab752f237d755897735dc755182f60af39cbc5b6.zip
qemu-ab752f237d755897735dc755182f60af39cbc5b6.tar.gz
qemu-ab752f237d755897735dc755182f60af39cbc5b6.tar.bz2
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging
x86/cpu/numa queue, 2017-10-27 # gpg: Signature made Fri 27 Oct 2017 15:17:12 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-and-machine-pull-request: (39 commits) x86: Skip check apic_id_limit for Xen numa: fixup parsed NumaNodeOptions earlier mips: r4k: replace cpu_model with cpu_type mips: mipssim: replace cpu_model with cpu_type mips: Magnum/Acer Pica 61: replace cpu_model with cpu_type mips: fulong2e: replace cpu_model with cpu_type mips: malta/boston: replace cpu_model with cpu_type mips: use object_new() instead of gnew()+object_initialize() sparc: leon3: use generic cpu_model parsing sparc: sparc: use generic cpu_model parsing sparc: sun4u/sun4v/niagara: use generic cpu_model parsing sparc: cleanup cpu type name composition tricore: use generic cpu_model parsing tricore: cleanup cpu type name composition unicore32: use generic cpu_model parsing unicore32: cleanup cpu type name composition xtensa: lx60/lx200/ml605/kc705: use generic cpu_model parsing xtensa: sim: use generic cpu_model parsing xtensa: cleanup cpu type name composition sh4: remove SuperHCPUClass::name field ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/xtensa')
-rw-r--r--target/xtensa/cpu.c2
-rw-r--r--target/xtensa/cpu.h4
-rw-r--r--target/xtensa/helper.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index a5651e5..9196178 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -83,7 +83,7 @@ static ObjectClass *xtensa_cpu_class_by_name(const char *cpu_model)
ObjectClass *oc;
char *typename;
- typename = g_strdup_printf("%s-" TYPE_XTENSA_CPU, cpu_model);
+ typename = g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), cpu_model);
oc = object_class_by_name(typename);
g_free(typename);
if (oc == NULL || !object_class_dynamic_cast(oc, TYPE_XTENSA_CPU) ||
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index 4803331..b17d7d9 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -469,11 +469,15 @@ void xtensa_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
#define cpu_signal_handler cpu_xtensa_signal_handler
#define cpu_list xtensa_cpu_list
+#define XTENSA_CPU_TYPE_SUFFIX "-" TYPE_XTENSA_CPU
+#define XTENSA_CPU_TYPE_NAME(model) model XTENSA_CPU_TYPE_SUFFIX
+
#ifdef TARGET_WORDS_BIGENDIAN
#define XTENSA_DEFAULT_CPU_MODEL "fsf"
#else
#define XTENSA_DEFAULT_CPU_MODEL "dc232b"
#endif
+#define XTENSA_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/target/xtensa/helper.c b/target/xtensa/helper.c
index e8fba20..216f198 100644
--- a/target/xtensa/helper.c
+++ b/target/xtensa/helper.c
@@ -76,7 +76,7 @@ void xtensa_register_core(XtensaConfigList *node)
node->next = xtensa_cores;
xtensa_cores = node;
- type.name = g_strdup_printf("%s-" TYPE_XTENSA_CPU, node->config->name);
+ type.name = g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), node->config->name);
type_register(&type);
g_free((gpointer)type.name);
}