All targets create their CPUs with an explicit parent now.

Assisted-by: Kiro
Signed-off-by: Alexander Graf <[email protected]>
---
 hw/core/cpu-common.c  | 12 ------------
 include/hw/core/cpu.h | 10 ----------
 2 files changed, 22 deletions(-)

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index eef243c1ad..829a044e9e 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -68,18 +68,6 @@ CPUState *cpu_create(Object *parent, const char *id, const 
char *typename)
     return cpu;
 }
 
-CPUState *cpu_create_orphan(const char *typename)
-{
-    Error *err = NULL;
-    CPUState *cpu = CPU(object_new(typename));
-    if (!qdev_realize(DEVICE(cpu), NULL, &err)) {
-        error_report_err(err);
-        object_unref(OBJECT(cpu));
-        exit(EXIT_FAILURE);
-    }
-    return cpu;
-}
-
 void cpu_reset_interrupt(CPUState *cpu, int mask)
 {
     qatomic_and(&cpu->interrupt_request, ~mask);
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 1b2ec1ab1e..544740a699 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -857,16 +857,6 @@ char *cpu_model_from_type(const char *typename);
  */
 CPUState *cpu_create(Object *parent, const char *id, const char *typename);
 
-/**
- * cpu_create_orphan:
- * @typename: The CPU type.
- *
- * Instantiates a CPU and realizes the CPU.
- *
- * Returns: A #CPUState or %NULL if an error occurred.
- */
-CPUState *cpu_create_orphan(const char *typename);
-
 /**
  * parse_cpu_option:
  * @cpu_option: The -cpu option including optional parameters.
-- 
2.47.1


Reply via email to