@@ -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.
*
@@ -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, '=');
There aren't any users of the helper left, remove it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- CC: Richard Henderson <richard.henderson@linaro.org> CC: "Emilio G. Cota" <cota@braap.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Eduardo Habkost <ehabkost@redhat.com> CC: "Alex Bennée" <alex.bennee@linaro.org> CC: "Philippe Mathieu-Daudé" <f4bug@amsat.org> --- include/qom/cpu.h | 11 ----------- qom/cpu.c | 25 ++----------------------- 2 files changed, 2 insertions(+), 34 deletions(-)