[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/47] accel/tcg: Remove CPUState.icount_decr_ptr
From: |
Richard Henderson |
Subject: |
[PULL 15/47] accel/tcg: Remove CPUState.icount_decr_ptr |
Date: |
Tue, 3 Oct 2023 10:30:20 -0700 |
We can now access icount_decr directly.
Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/cpu-all.h | 1 -
include/hw/core/cpu.h | 2 --
hw/core/cpu-common.c | 4 ++--
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 0dd32cb0e9..25cd63e1b8 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -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. */
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 115ddf6d8a..973ff9d106 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -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;
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index ced66c2b34..08d5bbc873 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -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;
--
2.34.1
- [PULL 09/47] accel/tcg: Move CPUTLB definitions from cpu-defs.h, (continued)
- [PULL 09/47] accel/tcg: Move CPUTLB definitions from cpu-defs.h, Richard Henderson, 2023/10/03
- [PULL 08/47] target/arm: Replace TARGET_PAGE_ENTRY_EXTRA, Richard Henderson, 2023/10/03
- [PULL 14/47] accel/tcg: Move CPUNegativeOffsetState into CPUState, Richard Henderson, 2023/10/03
- [PULL 20/47] accel/tcg: Remove cpu_set_cpustate_pointers, Richard Henderson, 2023/10/03
- [PULL 22/47] tcg: Remove TCGContext.tlb_fast_offset, Richard Henderson, 2023/10/03
- [PULL 26/47] accel/tcg: Modify atomic_mmu_lookup() to use CPUState, Richard Henderson, 2023/10/03
- [PULL 25/47] accel/tcg: Modify memory access functions to use CPUState, Richard Henderson, 2023/10/03
- [PULL 32/47] exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h', Richard Henderson, 2023/10/03
- [PULL 13/47] accel/tcg: Validate placement of CPUNegativeOffsetState, Richard Henderson, 2023/10/03
- [PULL 29/47] accel/tcg: Unify user and softmmu do_[st|ld]*_mmu(), Richard Henderson, 2023/10/03
- [PULL 15/47] accel/tcg: Remove CPUState.icount_decr_ptr,
Richard Henderson <=
- [PULL 17/47] accel/tcg: Remove cpu_neg(), Richard Henderson, 2023/10/03
- [PULL 11/47] target/arm: Remove size and alignment for cpu subclasses, Richard Henderson, 2023/10/03
- [PULL 07/47] accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG, Richard Henderson, 2023/10/03
- [PULL 16/47] accel/tcg: Move can_do_io to CPUNegativeOffsetState, Richard Henderson, 2023/10/03
- [PULL 21/47] accel/tcg: Remove env_neg(), Richard Henderson, 2023/10/03
- [PULL 24/47] accel/tcg: Modify probe_access_internal() to use CPUState, Richard Henderson, 2023/10/03
- [PULL 19/47] accel/tcg: Replace CPUState.env_ptr with cpu_env(), Richard Henderson, 2023/10/03
- [PULL 18/47] tcg: Rename cpu_env to tcg_env, Richard Henderson, 2023/10/03
- [PULL 23/47] accel/tcg: Modify tlb_*() to use CPUState, Richard Henderson, 2023/10/03
- [PULL 27/47] accel/tcg: Use CPUState in atomicity helpers, Richard Henderson, 2023/10/03