Skip to content

cpus: Avoid re-initializing fields cleared in cpu_common_reset_hold()

Philippe Mathieu-Daudé qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3accel/tcg: Remove pointless initialization of cflags_next_tbhw/core/cpu-common.c+0 -10 replies
2/3target/cpus: Remove pointless re-assignment of CPUState::exception_indextarget/hppa/cpu.c target/loongarch/cpu.c target/openrisc/cpu.c+0 -31 reply
3/3target/cpus: Remove pointless re-assignment of CPUState::haltedhw/misc/mips_cpc.c hw/ppc/e500.c target/arm/arm-powerctl.c +1 more+0 -52 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonBernhard Beschow
1/3R-b
2/3R-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] cpus: Avoid re-initializing fields cleared in cpu_common_reset_hold()

Having this call tree:

cpu_reset()
-> device_cold_reset()

     -> DeviceClass::reset()
        -> target_cpu_reset()
           -> ResettablePhases::hold()
              -> CPUClass::phases::hold()
                 -> cpu_common_reset_hold()

If we call cpu_reset(), common fields will be reset in cpu_common_reset_hold(), we don't need to manually do it.

Remove the pointless re-assignments on CPUState.

Based-on: <[email protected]>

Philippe Mathieu-Daudé (3):
accel/tcg: Remove pointless initialization of cflags_next_tb target/cpus: Remove pointless re-assignment of
CPUState::exception_index
target/cpus: Remove pointless re-assignment of CPUState::halted

 hw/core/cpu-common.c      | 1 -
 hw/misc/mips_cpc.c        | 1 -
 hw/ppc/e500.c             | 1 -
 target/arm/arm-powerctl.c | 2 --
 target/hppa/cpu.c         | 2 --
 target/loongarch/cpu.c    | 1 -
 target/openrisc/cpu.c     | 1 -
 7 files changed, 9 deletions(-)
Signature · 1 line
2.47.1