From bb883fd67707fd7f1bf04369aafd7ea7ad5b01b0 Mon Sep 17 00:00:00 2001 From: Claudio Fontana Date: Mon, 22 Mar 2021 14:27:42 +0100 Subject: accel: introduce new accessor functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce: accel_cpu_instance_init, accel_cpu_realizefn to be used by the targets/ initfn code, and by cpu_exec_realizefn respectively. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20210322132800.7470-7-cfontana@suse.de> Signed-off-by: Paolo Bonzini --- cpu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cpu.c') diff --git a/cpu.c b/cpu.c index ba5d272c1e..25e6fbfa2c 100644 --- a/cpu.c +++ b/cpu.c @@ -130,11 +130,7 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp) CPUClass *cc = CPU_GET_CLASS(cpu); cpu_list_add(cpu); - - if (cc->accel_cpu) { - /* NB: errp parameter is unused currently */ - cc->accel_cpu->cpu_realizefn(cpu, errp); - } + accel_cpu_realizefn(cpu, errp); #ifdef CONFIG_TCG /* NB: errp parameter is unused currently */ -- cgit 1.4.1