Skip to contentSkip to conversation

cpus: Remove CPUClass::init_accel_cpu() left-over hook

PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages Apr 12 – Apr 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpus: Remove CPUClass::init_accel_cpu() left-over hook

Commits f50d0f335a6 and a522b04bb9c ("target/riscv,i386: Remove AccelCPUClass::cpu_class_init need") removed the last uses of the CPUClass::init_accel_cpu hook. Remove it as unused.

---
 include/hw/core/cpu.h |  6 ------
 accel/accel-common.c  | 13 -------------
 2 files changed, 19 deletions(-)
include/hw/core/cpu.h +0 -6
index 04e1f970caf..cd03187e116 100644
@@ -186,12 +186,6 @@ struct CPUClass {
     /* when TCG is not available, this pointer is NULL */
     const TCGCPUOps *tcg_ops;
 
-    /*
-     * if not NULL, this is called in order for the CPUClass to initialize
-     * class data that depends on the accelerator, see accel/accel-common.c.
-     */
-    void (*init_accel_cpu)(struct AccelCPUClass *accel_cpu, CPUClass *cc);
-
     /*
      * Keep non-pointer data at the end to minimize holes.
      */
accel/accel-common.c +0 -13
index eecb2a292af..9c5b4111c8d 100644
@@ -37,23 +37,10 @@ static void accel_init_cpu_int_aux(ObjectClass *klass, void *opaque)
     CPUClass *cc = CPU_CLASS(klass);
     AccelCPUClass *accel_cpu = opaque;
 
-    /*
-     * The first callback allows accel-cpu to run initializations
-     * for the CPU, customizing CPU behavior according to the accelerator.
-     *
-     * The second one allows the CPU to customize the accel-cpu
-     * behavior according to the CPU.
-     *
-     * The second is currently only used by TCG, to specialize the
-     * TCGCPUOps depending on the CPU type.
-     */
     cc->accel_cpu = accel_cpu;
     if (accel_cpu->cpu_class_init) {
         accel_cpu->cpu_class_init(cc);
     }
-    if (cc->init_accel_cpu) {
-        cc->init_accel_cpu(accel_cpu, cc);
-    }
 }
 
 /* initialize the arch-specific accel CpuClass interfaces */
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Philippe Mathieu-Daudé

Commits f50d0f335a6 and a522b04bb9c ("target/riscv,i386: Remove AccelCPUClass::cpu_class_init need") removed the last uses of the CPUClass::init_accel_cpu hook. Remove it as unused.

---
  include/hw/core/cpu.h |  6 ------
  accel/accel-common.c  | 13 -------------
  2 files changed, 19 deletions(-)

r~