@@ -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.
*/
@@ -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 */
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. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260412212547.29645-1-philmd@linaro.org> --- include/hw/core/cpu.h | 6 ------ accel/accel-common.c | 13 ------------- 2 files changed, 19 deletions(-)