diff options
author | Richard Henderson | 2019-03-28 22:26:22 +0100 |
---|---|---|
committer | Richard Henderson | 2019-06-10 16:03:42 +0200 |
commit | 7506ed902eb97fe4e2a1dd16766c621d32ecc40d (patch) | |
tree | fcbd11f0a3306da8767ec90b41ccf016e9339bab /target/riscv | |
parent | cpu: Move ENV_OFFSET to exec/gen-icount.h (diff) | |
download | qemu-7506ed902eb97fe4e2a1dd16766c621d32ecc40d.tar.gz qemu-7506ed902eb97fe4e2a1dd16766c621d32ecc40d.tar.xz qemu-7506ed902eb97fe4e2a1dd16766c621d32ecc40d.zip |
cpu: Introduce cpu_set_cpustate_pointers
Consolidate some boilerplate from foo_cpu_initfn.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/riscv')
-rw-r--r-- | target/riscv/cpu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index e29879915f..86fd8693a8 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -367,10 +367,9 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp) static void riscv_cpu_init(Object *obj) { - CPUState *cs = CPU(obj); RISCVCPU *cpu = RISCV_CPU(obj); - cs->env_ptr = &cpu->env; + cpu_set_cpustate_pointers(cpu); } static const VMStateDescription vmstate_riscv_cpu = { |