[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [RFC v2 4/5] arm: cpu: add CPU_RESOLVING_TYPE macro
From: |
Igor Mammedov |
Subject: |
[Qemu-arm] [RFC v2 4/5] arm: cpu: add CPU_RESOLVING_TYPE macro |
Date: |
Thu, 18 Jan 2018 18:34:01 +0100 |
it will be used for providing to cpu name resolving class for
cpu_parse_cpu_model(CPU_RESOLVING_TYPE, ...)
in null-machine.c and in linux-user/main.c
Signed-off-by: Igor Mammedov <address@hidden>
---
target/arm/cpu.h | 3 +++
linux-user/main.c | 2 --
tests/machine-none.c | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 9631670..e2c7f08 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2172,6 +2172,9 @@ static inline bool arm_excp_unmasked(CPUState *cs,
unsigned int excp_idx,
#define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU
#define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX)
+/* used to get target's callback in cpu_parse_cpu_model() */
+#define CPU_RESOLVING_TYPE TYPE_ARM_CPU
+
#define cpu_signal_handler cpu_arm_signal_handler
#define cpu_list arm_cpu_list
diff --git a/linux-user/main.c b/linux-user/main.c
index d481e8c..bcf2e55 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4326,8 +4326,6 @@ int main(int argc, char **argv, char **envp)
#else
cpu_model = "qemu32";
#endif
-#elif defined(TARGET_ARM)
- cpu_model = "any";
#elif defined(TARGET_UNICORE32)
cpu_model = "any";
#elif defined(TARGET_M68K)
diff --git a/tests/machine-none.c b/tests/machine-none.c
index d16c283..7f64532 100644
--- a/tests/machine-none.c
+++ b/tests/machine-none.c
@@ -24,6 +24,8 @@ struct arch2cpu {
static struct arch2cpu cpus_map[] = {
/* tested targets list */
+ { "arm", "cortex-a15" },
+ { "aarch64", "cortex-a15" },
};
static const char *get_cpu_model_by_arch(const char *arch)
--
2.7.4
- [Qemu-arm] [RFC v2 0/5] generalize parsing of cpu_model (part 4), Igor Mammedov, 2018/01/18
- [Qemu-arm] [RFC v2 1/5] tests: add machine 'none' with -cpu test, Igor Mammedov, 2018/01/18
- [Qemu-arm] [RFC v2 2/5] machine: prepare machine 'none' to gradually switch to cpu_create() API, Igor Mammedov, 2018/01/18
- [Qemu-arm] [RFC v2 3/5] linux-user: prepare for switching to cpu_create() API, Igor Mammedov, 2018/01/18
- [Qemu-arm] [RFC v2 4/5] arm: cpu: add CPU_RESOLVING_TYPE macro,
Igor Mammedov <=
- [Qemu-arm] [RFC v2 5/5] x86: cpu: add CPU_RESOLVING_TYPE macro, Igor Mammedov, 2018/01/18
- Re: [Qemu-arm] [Qemu-devel] [RFC v2 0/5] generalize parsing of cpu_model (part 4), no-reply, 2018/01/18
- Re: [Qemu-arm] [Qemu-devel] [RFC v2 0/5] generalize parsing of cpu_model (part 4), no-reply, 2018/01/18