[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 24/24] cpu: get rid of cpu_generic_init()
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 24/24] cpu: get rid of cpu_generic_init() |
Date: |
Wed, 17 Jan 2018 16:43:36 +0100 |
There aren't any users of the helper left, remove it.
Signed-off-by: Igor Mammedov <address@hidden>
---
CC: Richard Henderson <address@hidden>
CC: "Emilio G. Cota" <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Eduardo Habkost <address@hidden>
CC: "Alex Bennée" <address@hidden>
CC: "Philippe Mathieu-Daudé" <address@hidden>
---
include/qom/cpu.h | 11 -----------
qom/cpu.c | 25 ++-----------------------
2 files changed, 2 insertions(+), 34 deletions(-)
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 93bd546..5446040 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -673,17 +673,6 @@ CPUState *cpu_create(const char *typename);
const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model);
/**
- * cpu_generic_init:
- * @typename: The CPU base type.
- * @cpu_model: The model string including optional parameters.
- *
- * Instantiates a CPU, processes optional parameters and realizes the CPU.
- *
- * Returns: A #CPUState or %NULL if an error occurred.
- */
-CPUState *cpu_generic_init(const char *typename, const char *cpu_model);
-
-/**
* cpu_has_work:
* @cpu: The vCPU to check.
*
diff --git a/qom/cpu.c b/qom/cpu.c
index e42d9a7..7ab7c36 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -90,14 +90,6 @@ const char *cpu_parse_cpu_model(const char *typename, const
char *cpu_model)
return cpu_type;
}
-CPUState *cpu_generic_init(const char *typename, const char *cpu_model)
-{
- /* TODO: all callers of cpu_generic_init() need to be converted to
- * call cpu_parse_features() only once, before calling cpu_generic_init().
- */
- return cpu_create(cpu_parse_cpu_model(typename, cpu_model));
-}
-
bool cpu_paging_enabled(const CPUState *cpu)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
@@ -335,22 +327,9 @@ static ObjectClass *cpu_common_class_by_name(const char
*cpu_model)
static void cpu_common_parse_features(const char *typename, char *features,
Error **errp)
{
- char *featurestr; /* Single "key=value" string being parsed */
char *val;
- static bool cpu_globals_initialized;
-
- /* TODO: all callers of ->parse_features() need to be changed to
- * call it only once, so we can remove this check (or change it
- * to assert(!cpu_globals_initialized).
- * Current callers of ->parse_features() are:
- * - cpu_generic_init()
- */
- if (cpu_globals_initialized) {
- return;
- }
- cpu_globals_initialized = true;
-
- featurestr = features ? strtok(features, ",") : NULL;
+ /* Single "key=value" string being parsed */
+ char *featurestr = features ? strtok(features, ",") : NULL;
while (featurestr) {
val = strchr(featurestr, '=');
--
2.7.4
- [Qemu-devel] [PATCH 14/24] sparc: cpu: add TARGET_DEFAULT_CPU_TYPE macro, (continued)
- [Qemu-devel] [PATCH 14/24] sparc: cpu: add TARGET_DEFAULT_CPU_TYPE macro, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 17/24] xtensa: cpu: rename XTENSA_DEFAULT_CPU_TYPE to TARGET_DEFAULT_CPU_TYPE, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 19/24] tilegx: cpu: add TARGET_DEFAULT_CPU_TYPE macro, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 18/24] hppa: cpu: add TARGET_DEFAULT_CPU_TYPE macro, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 21/24] linux/bsd-user: drop cpu_init() and use cpu_create() instead, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 20/24] machine: drop MachineState::cpu_model, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 23/24] nios2: 10m50_devboard: replace cpu_model with cpu_type, Igor Mammedov, 2018/01/17
- [Qemu-devel] [PATCH 24/24] cpu: get rid of cpu_generic_init(),
Igor Mammedov <=
- [Qemu-devel] [PATCH 22/24] cpu: get rid of unused cpu_init() defines, Igor Mammedov, 2018/01/17
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Peter Maydell, 2018/01/17
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Igor Mammedov, 2018/01/17
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Peter Maydell, 2018/01/17
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Igor Mammedov, 2018/01/18
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Peter Maydell, 2018/01/18
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Igor Mammedov, 2018/01/18
- Re: [Qemu-devel] [PATCH 00/24] generalize parsing of cpu_model (part 4), Peter Maydell, 2018/01/18