summaryrefslogtreecommitdiff
path: root/cpu.c
diff options
context:
space:
mode:
authorClaudio Fontana <[email protected]>2021-03-22 14:27:42 +0100
committerPaolo Bonzini <[email protected]>2021-05-10 15:41:50 -0400
commitbb883fd67707fd7f1bf04369aafd7ea7ad5b01b0 (patch)
treed2f6a06aa5972b7ed82d76c39672233ea8b01e8b /cpu.c
parent30565f10e90778cb52bcf4d798195d18d7aa80d7 (diff)
accel: introduce new accessor functions
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 <[email protected]> Reviewed-by: Alex BennĂ©e <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c6
1 files changed, 1 insertions, 5 deletions
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 */