aboutsummaryrefslogtreecommitdiff
path: root/target/sparc
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-06 10:58:06 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-07 12:13:27 +0100
commit2d56be5a29eb05e33d9fb74bdf55013c5016d5ba (patch)
tree7afef9daf6cec7f5fe1b8843b8f367e8d549d538 /target/sparc
parent66125f9360f2d698d772d045d1665ff6d380c6c7 (diff)
downloadqemu-2d56be5a29eb05e33d9fb74bdf55013c5016d5ba.zip
qemu-2d56be5a29eb05e33d9fb74bdf55013c5016d5ba.tar.gz
qemu-2d56be5a29eb05e33d9fb74bdf55013c5016d5ba.tar.bz2
target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'
Hegerogeneous code needs access to the FOO_CPU_TYPE_NAME() macro to resolve target CPU types. Move the declaration (along with the required FOO_CPU_TYPE_SUFFIX) to "cpu-qom.h". "target/foo/cpu-qom.h" is supposed to be target agnostic (include-able by any target). Add such mention in the header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231013140116.255-7-philmd@linaro.org>
Diffstat (limited to 'target/sparc')
-rw-r--r--target/sparc/cpu-qom.h5
-rw-r--r--target/sparc/cpu.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/target/sparc/cpu-qom.h b/target/sparc/cpu-qom.h
index b4a0db8..aca2941 100644
--- a/target/sparc/cpu-qom.h
+++ b/target/sparc/cpu-qom.h
@@ -1,5 +1,5 @@
/*
- * QEMU SPARC CPU
+ * QEMU SPARC CPU QOM header (target agnostic)
*
* Copyright (c) 2012 SUSE LINUX Products GmbH
*
@@ -31,6 +31,9 @@
OBJECT_DECLARE_CPU_TYPE(SPARCCPU, SPARCCPUClass, SPARC_CPU)
+#define SPARC_CPU_TYPE_SUFFIX "-" TYPE_SPARC_CPU
+#define SPARC_CPU_TYPE_NAME(model) model SPARC_CPU_TYPE_SUFFIX
+
typedef struct sparc_def_t sparc_def_t;
/**
* SPARCCPUClass:
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index b48004f..a808f2a 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -654,8 +654,6 @@ hwaddr cpu_get_phys_page_nofault(CPUSPARCState *env, target_ulong addr,
#endif
#endif
-#define SPARC_CPU_TYPE_SUFFIX "-" TYPE_SPARC_CPU
-#define SPARC_CPU_TYPE_NAME(model) model SPARC_CPU_TYPE_SUFFIX
#define CPU_RESOLVING_TYPE TYPE_SPARC_CPU
#define cpu_list sparc_cpu_list