[RFC PATCH v2 087/137] cpu: Remove cpu_create_orphan()

Alexander Graf <[email protected]>
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel,org.nongnu.qemu-riscv
Message-ID <[email protected]>
All targets create their CPUs with an explicit parent now.

AI-used-for: code (refactoring)
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.