]> git.proxmox.com Git - mirror_qemu.git/commitdiff
accel/tcg: Remove CPUState.icount_decr_ptr
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 13 Sep 2023 01:07:00 +0000 (18:07 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 3 Oct 2023 15:01:02 +0000 (08:01 -0700)
We can now access icount_decr directly.

Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
hw/core/cpu-common.c
include/exec/cpu-all.h
include/hw/core/cpu.h

index ced66c2b342941aedfdb1b56a4dc6fd8ba758d37..08d5bbc873a73115f1018d6f298b0147df59355b 100644 (file)
@@ -86,7 +86,7 @@ void cpu_exit(CPUState *cpu)
     qatomic_set(&cpu->exit_request, 1);
     /* Ensure cpu_exec will see the exit request after TCG has exited.  */
     smp_wmb();
-    qatomic_set(&cpu->icount_decr_ptr->u16.high, -1);
+    qatomic_set(&cpu->neg.icount_decr.u16.high, -1);
 }
 
 static int cpu_common_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)
@@ -130,7 +130,7 @@ static void cpu_common_reset_hold(Object *obj)
     cpu->halted = cpu->start_powered_off;
     cpu->mem_io_pc = 0;
     cpu->icount_extra = 0;
-    qatomic_set(&cpu->icount_decr_ptr->u32, 0);
+    qatomic_set(&cpu->neg.icount_decr.u32, 0);
     cpu->can_do_io = 1;
     cpu->exception_index = -1;
     cpu->crash_occurred = false;
index 0dd32cb0e99ddfbbd94a0e0b8f42dc01d8ef081f..25cd63e1b8f9c5abec8adf90425cd51c6d767f39 100644 (file)
@@ -432,7 +432,6 @@ int cpu_exec(CPUState *cpu);
 static inline void cpu_set_cpustate_pointers(ArchCPU *cpu)
 {
     cpu->parent_obj.env_ptr = &cpu->env;
-    cpu->parent_obj.icount_decr_ptr = &cpu->parent_obj.neg.icount_decr;
 }
 
 /* Validate correct placement of CPUArchState. */
index 115ddf6d8ac4284c32f23b04a60747db704df3a6..973ff9d106a5242f5c9c40105dfd09729df7f85f 100644 (file)
@@ -429,7 +429,6 @@ struct qemu_work_item;
  * @as: Pointer to the first AddressSpace, for the convenience of targets which
  *      only have a single AddressSpace
  * @env_ptr: Pointer to subclass-specific CPUArchState field.
- * @icount_decr_ptr: Pointer to IcountDecr field within subclass.
  * @gdb_regs: Additional GDB registers.
  * @gdb_num_regs: Number of total registers accessible to GDB.
  * @gdb_num_g_regs: Number of registers in GDB 'g' packets.
@@ -504,7 +503,6 @@ struct CPUState {
     MemoryRegion *memory;
 
     CPUArchState *env_ptr;
-    IcountDecr *icount_decr_ptr;
 
     CPUJumpCache *tb_jmp_cache;